diff --git a/files/.config/htop/htoprc b/files/.config/htop/htoprc index a4bc54c..dcf5518 120000 --- a/files/.config/htop/htoprc +++ b/files/.config/htop/htoprc @@ -1 +1 @@ -/nix/store/mq1kmcv74gnyvvjsp5djgsd5p8hqsqx1-home-manager-files/.config/htop/htoprc \ No newline at end of file +/nix/store/nb0lqjygfrf2v2qaifc79xw87zb2xk37-home-manager-files/.config/htop/htoprc \ No newline at end of file diff --git a/files/nix-stuff/nixpkgs/config/fish.nix b/files/nix-stuff/nixpkgs/config/fish.nix index 477ab7e..bdf54ef 100644 --- a/files/nix-stuff/nixpkgs/config/fish.nix +++ b/files/nix-stuff/nixpkgs/config/fish.nix @@ -20,18 +20,6 @@ in ls = "exa --icons"; }; - shellAbbrs = { - vim = "nvim"; - tsh = "trash"; - cxmonad = "nvim /home/leon/.xmonad/lib/Config.hs"; - cnix = "cd ~/nixpkgs/ && nvim home.nix && cd -"; - - gaa = "git add --all"; - gc = "git commit -m "; - gp = "git push"; - gs = "git status"; - }; - plugins = [ { diff --git a/files/nix-stuff/nixpkgs/config/generalConfig.nix b/files/nix-stuff/nixpkgs/config/generalConfig.nix index 850ef77..9dd0dfe 100644 --- a/files/nix-stuff/nixpkgs/config/generalConfig.nix +++ b/files/nix-stuff/nixpkgs/config/generalConfig.nix @@ -5,15 +5,16 @@ let in { options.elkowar.generalConfig = with lib; { - shellAliases = lib.mkOption { + shellAbbrs = lib.mkOption { type = types.attrsOf types.str; default = {}; description = '' - A map of aliases that will get applied to zsh and fish configuration. + A map of abbreviations that will get applied to zsh and fish configuration. ''; }; }; config = { - programs.zsh.shellAliases = cfg.shellAliases; + elkowar.programs.zsh.abbrs = cfg.shellAbbrs; + programs.fish.shellAbbrs = cfg.shellAbbrs; }; } diff --git a/files/nix-stuff/nixpkgs/config/zsh.nix b/files/nix-stuff/nixpkgs/config/zsh.nix index 8531b76..3606a11 100644 --- a/files/nix-stuff/nixpkgs/config/zsh.nix +++ b/files/nix-stuff/nixpkgs/config/zsh.nix @@ -12,15 +12,6 @@ let (mapAttrs (k: v: ''abbr --session ${k}="${v}" >/dev/null 2>&1'') abbrs) ); - abbrs = makeAbbrs { - gc = "git commit -m"; - gp = "git push"; - gaa = "git add --all"; - gs = "git status"; - cxmonad = "cd ~/.xmonad && nvim ~/.xmonad/lib/Config.hs && cd -"; - cnix = "cd ~/nixpkgs/ && nvim home.nix && cd -"; - }; - manFunction = '' function man() { env \ @@ -104,8 +95,14 @@ in { options.elkowar.programs.zsh = { enable = lib.mkEnableOption "ZSH configuration"; + abbrs = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + description = "Shell abbreviations"; + default = {}; + }; }; config = { + home.packages = [ pkgs.zsh-completions ]; programs.zsh = { enable = true; @@ -113,7 +110,6 @@ in enableAutosuggestions = true; enableCompletion = true; dotDir = ".config/zsh"; - #defaultKeymap = "viins"; history = { save = 10000; share = false; @@ -166,7 +162,7 @@ in ${fzf-tab-stuff} ${fixedKeybinds} - ${abbrs} + ${makeAbbrs cfg.abbrs} ${manFunction} ${builtins.readFile ./prompt.zsh} diff --git a/files/nix-stuff/nixpkgs/home.nix b/files/nix-stuff/nixpkgs/home.nix index f277c36..19cc628 100644 --- a/files/nix-stuff/nixpkgs/home.nix +++ b/files/nix-stuff/nixpkgs/home.nix @@ -27,7 +27,11 @@ in }; profiles = { - base.enable = true; + base = { + enable = true; + enableFish = true; + enableZsh = true; + }; desktop.enable = true; }; diff --git a/files/nix-stuff/nixpkgs/profiles/base.nix b/files/nix-stuff/nixpkgs/profiles/base.nix index 287c32e..0d8997b 100644 --- a/files/nix-stuff/nixpkgs/profiles/base.nix +++ b/files/nix-stuff/nixpkgs/profiles/base.nix @@ -7,17 +7,26 @@ in { options.profiles.base = { enable = lib.mkEnableOption "Basic profile enabled"; - #useZsh = lib.mkEnableOption + enableFish = lib.mkEnableOption "Fish shell"; + enableZsh = lib.mkEnableOption "Zsh shell"; }; imports = [ ../config/tmux.nix ../config/generalConfig.nix ../config/zsh.nix ../config/fish.nix ]; config = lib.mkIf cfg.enable { elkowar.programs.tmux.enable = true; - elkowar.programs.zsh.enable = true; - elkowar.programs.fish.enable = true; - elkowar.generalConfig.shellAliases = { - gc = "git commit"; + elkowar.programs.zsh.enable = cfg.enableZsh; + elkowar.programs.fish.enable = cfg.enableFish; + elkowar.generalConfig.shellAbbrs = { + vim = "nvim"; + tsh = "trash"; + cxmonad = "nvim /home/leon/.xmonad/lib/Config.hs"; + cnix = "cd ~/nixpkgs/ && nvim home.nix && cd -"; + + gaa = "git add --all"; + gc = "git commit -m "; + gp = "git push"; + gs = "git status"; }; home.packages = with pkgs; [ @@ -29,7 +38,6 @@ in websocat niv exa - zsh-completions trash-cli mdcat github-cli @@ -47,8 +55,8 @@ in fzf = { enable = true; - enableFishIntegration = true; - enableZshIntegration = true; + enableFishIntegration = cfg.enableFish; + enableZshIntegration = cfg.enableZsh; defaultCommand = "rg --files"; fileWidgetCommand = "fd --type f"; changeDirWidgetCommand = "rg --files --null | xargs -0 dirname | sort -u"; @@ -56,8 +64,8 @@ in direnv = { enable = true; - enableFishIntegration = true; - enableZshIntegration = true; + enableFishIntegration = cfg.enableFish; + enableZshIntegration = cfg.enableZsh; enableNixDirenvIntegration = true; }; };