aboutsummaryrefslogtreecommitdiff
path: root/modules/home/shells/zsh
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2026-01-09 16:57:15 +0100
committerschererleander <leander@schererleander.de>2026-01-09 23:13:49 +0100
commit3b5a73c436eb22e0cda59469263490705e149cb9 (patch)
treeae3f20ca6008b11f71247dfc6e2df8218de9b95c /modules/home/shells/zsh
parentec45aae780da92e12cf82c5a32e336b14b7540ba (diff)
refactor: use flake-parts, change modules structure
Diffstat (limited to 'modules/home/shells/zsh')
-rw-r--r--modules/home/shells/zsh/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/modules/home/shells/zsh/default.nix b/modules/home/shells/zsh/default.nix
new file mode 100644
index 0000000..72d3f9a
--- /dev/null
+++ b/modules/home/shells/zsh/default.nix
@@ -0,0 +1,66 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+
+let
+ inherit (lib) mkEnableOption mkIf;
+ cfg = config.nx.shells.zsh;
+in
+{
+ options.nx.shells.zsh = {
+ enable = mkEnableOption "zsh shell";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ zoxide
+ ];
+
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ autosuggestion.enable = true;
+ syntaxHighlighting.enable = true;
+ initContent = ''
+ # view man pages with nvim
+ export MANPAGER="nvim +Man!"
+
+ # Directory completion with trailing slash
+ zstyle ':completion:*' list-dirs-first true
+ zstyle ':completion:*' special-dirs true
+ zstyle ':completion:*' squeeze-slashes true
+ zstyle ':completion:*' add-space false
+
+ # Case-insensitive completion
+ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
+ # vim keybindings
+ bindkey -v
+
+ # zoxide smarter cmd command
+ eval "$(zoxide init zsh)"
+ '';
+ shellAliases = {
+ ls = "ls --color=auto";
+ };
+
+ zplug = {
+ enable = true;
+ plugins = [
+ { name = "mafredri/zsh-async"; }
+ {
+ name = "sindresorhus/pure";
+ tags = [
+ "as:theme"
+ "use:pure.zsh"
+ ];
+ }
+ { name = "zdharma-continuum/fast-syntax-highlighting"; }
+ { name = "zsh-users/zsh-autosuggestions"; }
+ ];
+ };
+ };
+ };
+}