diff options
-rw-r--r-- | config/zsh/module.nix | 13 | ||||
-rw-r--r-- | config/zsh/zshrc.nix | 6 | ||||
-rw-r--r-- | modules/shell/default.nix | 12 |
3 files changed, 18 insertions, 13 deletions
diff --git a/config/zsh/module.nix b/config/zsh/module.nix new file mode 100644 index 000000000000..6dc64f94097b --- /dev/null +++ b/config/zsh/module.nix @@ -0,0 +1,13 @@ +{ config, ... }: + +{ + home.qyliss.dirs."state/zsh" = {}; + + environment.etc.zshrc.text = '' + unsetopt GLOBAL_RCS + + if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then + . ${config.system.build.setEnvironment} + fi + ''; +} diff --git a/config/zsh/zshrc.nix b/config/zsh/zshrc.nix index e7553d63d873..ccdf65aa132b 100644 --- a/config/zsh/zshrc.nix +++ b/config/zsh/zshrc.nix @@ -1,12 +1,10 @@ { stdenv, lib - , coreutils , zsh-autosuggestions , zsh-history-substring-search , zsh-nix-shell , zsh-syntax-highlighting - - }: +}: let options = { @@ -77,7 +75,7 @@ fzf_ctrl_t() { fi } -HISTFILE="$XDG_DATA_HOME/zsh/history" +HISTFILE="~/state/zsh/history" REPORTTIME=5 SAVEHIST=9000 ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) diff --git a/modules/shell/default.nix b/modules/shell/default.nix index cbf3a79f73e7..d26d1fb1edbc 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -1,6 +1,8 @@ -{ pkgs, config, ... }: +{ pkgs, ... }: { + imports = [ ../../config/zsh/module.nix ]; + environment.systemPackages = with pkgs.pkgsConfigured; [ coreutils-prefixed curl @@ -34,12 +36,4 @@ environment.variables.EDITOR = "kak"; environment.variables.EMAIL = "hi@alyssa.is"; - - environment.etc.zshrc.text = '' - unsetopt GLOBAL_RCS - - if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]; then - . ${config.system.build.setEnvironment} - fi - ''; } |