diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-01-08 02:48:11 +0100 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-01-08 19:08:12 +0100 |
| commit | 6174f3650cf42aaf008012e828d5a1f8e2ce037f (patch) | |
| tree | 9bbbd99680cd5adb56596a14734d4896bc6af733 /modules/programs/zsh.nix | |
| parent | c582c4d0675aada46fa196b7af1941ed753d055f (diff) | |
refactor(modules): separate nixos/home-manager modules, use standard option conventions
Diffstat (limited to 'modules/programs/zsh.nix')
| -rw-r--r-- | modules/programs/zsh.nix | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix deleted file mode 100644 index d3fa72e..0000000 --- a/modules/programs/zsh.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - config, - pkgs, - lib, - username, - ... -}: -{ - options.nx.programs.zsh.enable = lib.mkEnableOption "Configure zsh"; - config = lib.mkIf config.nx.programs.zsh.enable { - home-manager.users.${username} = { - home.packages = with pkgs; [ - zoxide - imagemagick - ]; - 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 - - # imagemagick wrapper function to remove background - remove_bg() { - if [[ $# -lt 2 ]]; then - echo 'Usage: remove_bg <input_file> <fuzz_percentage> [transparent_color] [output_file]' - return 1 - fi - local input_file=$1 - local fuzz=$2 - local transparent_color=$3 - local output_file=$4 - - magick "$input_file" \ - -fuzz $fuzz -transparent "$transparent_color" \ - -alpha on -channel A -blur 0x2 -level 5%,100% +channel \ - "$output_file" - - echo "Saved transparent image to: $output_file" - } - - eval "$(zoxide init zsh)" - ''; - shellAliases = { - ls = "ls --color=auto"; - nixceck = "nix flake check --all-systems"; - }; - 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"; } - ]; - }; - }; - }; - }; -} |
