diff --git a/hosts/common/configs/zsh.nix b/hosts/common/configs/zsh.nix index 5b95235..6c1512c 100644 --- a/hosts/common/configs/zsh.nix +++ b/hosts/common/configs/zsh.nix @@ -1,3 +1,6 @@ { - programs.zsh.enable = true; + programs.zsh = { + enable = true; + histFile = "/var/lib/zsh/history"; + }; } diff --git a/hosts/common/default.nix b/hosts/common/default.nix index a93d00b..8a54d1a 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -34,13 +34,13 @@ "/etc/nixos" "/etc/NetworkManager/system-connections" "/var/lib/nixos" - "/var/log" "/var/lib/systemd/coredump" + "/var/lib/zsh" + "/var/log" ]; files = [ "/etc/ssh/ssh_host_ed25519_key" "/etc/machine-id" - "/root/.zsh_history" ]; }; diff --git a/users/common/configs/zsh.nix b/users/common/configs/zsh.nix index 05c2ef2..7b014b9 100644 --- a/users/common/configs/zsh.nix +++ b/users/common/configs/zsh.nix @@ -2,7 +2,10 @@ programs.zsh = { enable = true; autocd = true; - history.expireDuplicatesFirst = true; + history = { + path = "$HOME/.local/share/zsh/history"; + expireDuplicatesFirst = true; + }; historySubstringSearch.enable = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; diff --git a/users/common/default.nix b/users/common/default.nix index 857a4b4..caad225 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -72,10 +72,10 @@ in "VMs" "git" ".mozilla" + ".local/share/zsh" ]; files = [ - ".zsh_history" - ".key.txt" + ".local/share/sops-nix/key.txt" ]; allowOther = true; };