summary refs log tree commit diff
path: root/nixos/modules/programs/zsh/zsh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/programs/zsh/zsh.nix')
-rw-r--r--nixos/modules/programs/zsh/zsh.nix19
1 files changed, 5 insertions, 14 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index b88f54678ee1..42d4e1d4ada0 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -69,7 +69,9 @@ in
 
       promptInit = mkOption {
         default = ''
-          autoload -U promptinit && promptinit && prompt walters
+          if [ "$TERM" != dumb ]; then
+            autoload -U promptinit && promptinit && prompt walters
+          fi
         '';
         description = ''
           Shell script code used to initialise the zsh prompt.
@@ -85,13 +87,6 @@ in
         type = types.bool;
       };
 
-      enableAutosuggestions = mkOption {
-        default = false;
-        description = ''
-          Enable zsh-autosuggestions
-        '';
-        type = types.bool;
-      };
     };
 
   };
@@ -108,6 +103,8 @@ in
         if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi
         export __ETC_ZSHENV_SOURCED=1
 
+        ${config.system.build.setEnvironment.text}
+
         ${cfge.shellInit}
 
         ${cfg.shellInit}
@@ -127,8 +124,6 @@ in
         if [ -n "$__ETC_ZPROFILE_SOURCED" ]; then return; fi
         __ETC_ZPROFILE_SOURCED=1
 
-        ${config.system.build.setEnvironment.text}
-
         ${cfge.loginShellInit}
 
         ${cfg.loginShellInit}
@@ -166,10 +161,6 @@ in
 
         ${optionalString cfg.enableCompletion "autoload -U compinit && compinit"}
 
-        ${optionalString (cfg.enableAutosuggestions)
-          "source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
-        }
-
         ${cfge.interactiveShellInit}
 
         ${cfg.interactiveShellInit}