diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2024-01-07 12:00:08 -0500 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2024-01-07 12:00:08 -0500 |
commit | 7b79203f54853733d4fae88943829d0e24e6e49f (patch) | |
tree | a352d199fad7453332b9308a6295164157729f27 /modules/shell/zsh.nix | |
parent | 184bd30bcb303104a4981ac742d8f8961c5477e7 (diff) | |
download | nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.gz nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.bz2 nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.zip |
massive overhaul
Diffstat (limited to 'modules/shell/zsh.nix')
-rw-r--r-- | modules/shell/zsh.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix new file mode 100644 index 0000000..c39ec7a --- /dev/null +++ b/modules/shell/zsh.nix @@ -0,0 +1,56 @@ +{ + config, + options, + lib, + pkgs, + ... +}: let + zshConfig = config.modules.shell.zsh; +in { + options.modules.shell.zsh = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + }; + }; + + config = lib.mkIf (zshConfig.enable) { + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + environment.sessionVariables.SHELL = "${pkgs.zsh}/bin/zsh"; + environment.pathsToLink = ["/share/zsh"]; + + home.packages = [ + pkgs.zsh-autocomplete + pkgs.pure-prompt + + pkgs.wget + pkgs.curl + + pkgs.htop + pkgs.btop + ]; + + home.manager.programs = { + direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; + zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + autocd = true; + defaultKeymap = "viins"; + dotDir = ".config/zsh"; + + history = { + size = 10000; + ignoreDups = true; + }; + }; + }; + }; +} |