From 83e9630ce42986d098abd0bc77d42c03b8594508 Mon Sep 17 00:00:00 2001 From: Skullheadx Date: Sat, 4 Jul 2026 12:49:32 -0400 Subject: zsh linux and zsh darwin, also add some tools for linux --- zsh-linux.nix | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 zsh-linux.nix (limited to 'zsh-linux.nix') diff --git a/zsh-linux.nix b/zsh-linux.nix new file mode 100644 index 0000000..70524a5 --- /dev/null +++ b/zsh-linux.nix @@ -0,0 +1,77 @@ +{ + config, + pkgs, + username, + ... +}: { + environment.systemPackages = with pkgs; [ + fzf + ]; + + programs.fzf = { + keybindings = true; + fuzzyCompletion = true; + }; + + programs.direnv = { + enable = true; + enableZshIntegration = true; + loadInNixShell = true; + nix-direnv = { + enable = true; + }; + silent = true; + }; + + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; + + programs.zsh = { + enable = true; + autosuggestions = { + enable = true; + async = true; + highlightStyle = "fg=cyan"; + strategy = [ + "history" + "completion" + ]; + }; + enableBashCompletion = true; + enableCompletion = true; + enableGlobalCompInit = true; + enableLsColors = true; + syntaxHighlighting = { + enable = true; + highlighters = [ + "main" + "brackets" + "pattern" + "cursor" + "regexp" + "root" + "line" + ]; + }; + vteIntegration = true; + # enableFzfCompletion = true; + # enableFzfGit = true; + # enableFzfHistory = true; + histFile = "$HOME/.zsh_history"; + histSize = 100000; + promptInit = '' + PROMPT=$'%{\e[97m%}[%{\e[m%}%{\e[92m%}%n%{\e[m%}%{\e[32m%}@%{\e[m%}%{\e[92m%}%m%{\e[m%}:%{\e[92m%}%~%{\e[m%}%{\e[97m%}]%{\e[m%}%{\e[97m%}%#%{\e[m%} ' + ''; + interactiveShellInit = '' + setopt autocd extendedglob nomatch notify + + bindkey -v + export KEYTIMEOUT=20 + ''; + }; + + users.defaultUserShell = pkgs.zsh; + users.users.${username}.shell = pkgs.zsh; +} -- cgit v1.3.1