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 --- common-darwin.nix | 4 +-- common-linux.nix | 21 ++++++++++-- hosts/nepsis/configuration.nix | 16 +-------- zsh-darwin.nix | 37 ++++++++++++++++++++ zsh-linux.nix | 77 ++++++++++++++++++++++++++++++++++++++++++ zsh.nix | 31 ----------------- 6 files changed, 135 insertions(+), 51 deletions(-) create mode 100644 zsh-darwin.nix create mode 100644 zsh-linux.nix delete mode 100644 zsh.nix diff --git a/common-darwin.nix b/common-darwin.nix index c4b49ac..e98a33c 100644 --- a/common-darwin.nix +++ b/common-darwin.nix @@ -6,7 +6,7 @@ ... }: { imports = [ - ./zsh.nix + ./zsh-darwin.nix ./vim.nix ./irc.nix ]; @@ -27,8 +27,6 @@ passExtensions.pass-update nh nix-output-monitor - fzf - zoxide jq btop tealdeer diff --git a/common-linux.nix b/common-linux.nix index 9b7884e..945fa0f 100644 --- a/common-linux.nix +++ b/common-linux.nix @@ -2,10 +2,12 @@ config, pkgs, inputs, + username, ... }: { imports = [ ./bash.nix + ./zsh-linux.nix ./irc.nix ]; @@ -48,13 +50,23 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + ffmpeg + wget - nixfmt + curl + jq + + lazygit fastfetch pamixer + btop + tealdeer + + nixfmt gcc alejandra gnumake + nh nix-output-monitor ]; @@ -84,7 +96,7 @@ config = { user = { name = "Skullheadx"; - email = "admonty1@protonmail.com"; + email = "andrew@montgomery.systems"; }; pull.rebase = true; url = { @@ -99,6 +111,11 @@ # programs here, NOT in environment.systemPackages ]; + environment.variables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + }; + environment.sessionVariables = { }; diff --git a/hosts/nepsis/configuration.nix b/hosts/nepsis/configuration.nix index 3c59824..a7f1c9e 100644 --- a/hosts/nepsis/configuration.nix +++ b/hosts/nepsis/configuration.nix @@ -102,7 +102,7 @@ enable = true; startWithGraphical = config.services.xserver.enable; install = true; - defaultEditor = true; + # defaultEditor = true; }; programs.firefox = { @@ -111,20 +111,6 @@ package = pkgs.librewolf; }; - programs.git = { - enable = true; - config = { - user = { - name = "Skullheadx"; - email = "admonty1@protonmail.com"; - }; - pull.rebase = true; - url = { - "git@github.com:".insteadOf = "https://github.com/"; - }; - }; - }; - programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play diff --git a/zsh-darwin.nix b/zsh-darwin.nix new file mode 100644 index 0000000..74e164f --- /dev/null +++ b/zsh-darwin.nix @@ -0,0 +1,37 @@ +{ + config, + pkgs, + ... +}: { + environment.systemPackages = with pkgs; [ + direnv + fzf + zoxide + ]; + + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableBashCompletion = true; + enableCompletion = true; + enableGlobalCompInit = true; + enableFastSyntaxHighlighting = 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 = '' + eval "$(direnv hook zsh)" + eval "$(zoxide init zsh)" + + setopt autocd extendedglob nomatch notify + + bindkey -v + export KEYTIMEOUT=20 + ''; + }; +} 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; +} diff --git a/zsh.nix b/zsh.nix deleted file mode 100644 index 5c25b07..0000000 --- a/zsh.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableBashCompletion = true; - enableCompletion = true; - enableGlobalCompInit = true; - enableFastSyntaxHighlighting = 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 = '' - eval "$(direnv hook zsh)" - eval "$(zoxide init zsh)" - - setopt autocd extendedglob nomatch notify - - bindkey -v - export KEYTIMEOUT=20 - ''; - }; -} -- cgit v1.3.1