aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tools/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tools/zsh')
-rw-r--r--modules/tools/zsh/default.nix41
1 files changed, 21 insertions, 20 deletions
diff --git a/modules/tools/zsh/default.nix b/modules/tools/zsh/default.nix
index fcb7829..294fb5a 100644
--- a/modules/tools/zsh/default.nix
+++ b/modules/tools/zsh/default.nix
@@ -5,28 +5,29 @@
enable = lib.mkEnableOption "Enables zsh.";
};
- config = let
- nixCommandWrappers = builtins.readFile ./nix-aliases.sh;
- in lib.mkIf config.tools.zsh.enable {
- programs.zsh = {
- enable = true;
- dotDir = "${config.xdg.configHome}/zsh";
- history.path = "${config.xdg.cacheHome}/zsh/history";
- enableCompletion = true;
- initContent = ''
- setopt PROMPT_SUBST
+ config =
+ let
+ nixCommandWrappers = builtins.readFile ./nix-aliases.sh;
+ in
+ lib.mkIf config.tools.zsh.enable {
+ programs.zsh = {
+ enable = true;
+ dotDir = "${config.xdg.configHome}/zsh";
+ history.path = "${config.xdg.cacheHome}/zsh/history";
+ enableCompletion = true;
+ initContent = ''
+ setopt PROMPT_SUBST
- autoload -U colors && colors
+ autoload -U colors && colors
- bindkey "^[[3~" delete-char
- bindkey "^?" backward-delete-char
- ${nixCommandWrappers}
- '';
- };
+ bindkey "^[[3~" delete-char
+ bindkey "^?" backward-delete-char
+ ${nixCommandWrappers}
+ '';
+ };
- programs.bash.initExtra = lib.mkIf config.programs.bash.enable
- (lib.mkAfter nixCommandWrappers);
+ programs.bash.initExtra = lib.mkIf config.programs.bash.enable (lib.mkAfter nixCommandWrappers);
- home.sessionVariables.SHELL = "${config.programs.zsh.package}/bin/zsh";
- };
+ home.sessionVariables.SHELL = "${config.programs.zsh.package}/bin/zsh";
+ };
}