diff --git a/hosts/atlas/default.nix b/hosts/atlas/default.nix index 2c06821..54cc8fa 100644 --- a/hosts/atlas/default.nix +++ b/hosts/atlas/default.nix @@ -36,9 +36,7 @@ with lib.my; pass.enable = true; }; shell = { - fzf.enable = true; git.enable = true; - nnn.enable = true; zsh.enable = true; }; }; diff --git a/modules/default.nix b/modules/default.nix index 5613449..206bb6c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,9 +7,7 @@ ./editors/vscode.nix ./security/gpg.nix ./security/pass.nix - ./shell/fzf.nix ./shell/git.nix - ./shell/nnn.nix ./shell/zsh.nix ]; } \ No newline at end of file diff --git a/modules/options.nix b/modules/options.nix index 8c61e15..db8f437 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -65,5 +65,9 @@ with lib.my; users.users.${config.user.name} = mkAliasDefinitions options.user; nixpkgs.config.allowUnfree = true; + + environment.extraInit = + concatStringsSep "\n" + (mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env); }; } \ No newline at end of file diff --git a/modules/shell/fzf.nix b/modules/shell/fzf.nix deleted file mode 100644 index e821166..0000000 --- a/modules/shell/fzf.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -with lib.my; -let cfg = config.modules.shell.fzf; -in { - options.modules.shell.fzf = { - enable = mkBoolOpt false; - }; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - bind - ]; - home.programs.fzf = { - enable = true; - enableZshIntegration = true; - defaultCommand = "fd --type f --hidden --follow --exclude .git"; - }; - }; -} \ No newline at end of file diff --git a/modules/shell/nnn.nix b/modules/shell/nnn.nix deleted file mode 100644 index 3268c3c..0000000 --- a/modules/shell/nnn.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -with lib.my; -let cfg = config.modules.shell.nnn; -in { - options.modules.shell.nnn = { - enable = mkBoolOpt false; - }; - - config = mkIf cfg.enable { - home.programs.nnn = { - enable = true; - }; - }; -} \ No newline at end of file diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index 0d60e10..6231ba7 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -9,27 +9,33 @@ in { }; config = mkIf cfg.enable { - home.packages = with pkgs; [ + users.defaultUserShell = pkgs.zsh; + + programs.zsh = { + enable = true; + enableCompletion = true; + }; + + user.packages = with pkgs; [ + fd + fzf + jq + nix-zsh-completions + nnn + ripgrep + zsh zsh-autosuggestions zsh-fast-syntax-highlighting zsh-history-substring-search ]; - home.programs.zsh = { - enable = true; - enableCompletion = true; - shellAliases = { - cp = "cp -iv"; - mv = "mv -iv"; - rm = "rm -v"; - mkdir = "mkdir -v"; - ls = "ls -h --color=auto --group-directories-first"; - e = "nvim"; - f = "nnn"; - g = "git"; - n = "nnn"; - v = "nvim"; - }; + env = { + ZDOTDIR = "$XDG_CONFIG_HOME/zsh"; + ZSH_CACHE = "$XDG_CACHE_HOME/zsh"; + }; + + home.configFile = { + "zsh" = {}; }; }; } \ No newline at end of file