Fix zsh impermanence

https://logs.nix.samueldr.com/nixos-chat/2020-06-07
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-14 17:59:27 +03:00
parent ec56190919
commit f89bd9e84f
4 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
{ {
programs.zsh.enable = true; programs.zsh = {
enable = true;
histFile = "/var/lib/zsh/history";
};
} }

View File

@@ -34,13 +34,13 @@
"/etc/nixos" "/etc/nixos"
"/etc/NetworkManager/system-connections" "/etc/NetworkManager/system-connections"
"/var/lib/nixos" "/var/lib/nixos"
"/var/log"
"/var/lib/systemd/coredump" "/var/lib/systemd/coredump"
"/var/lib/zsh"
"/var/log"
]; ];
files = [ files = [
"/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_ed25519_key"
"/etc/machine-id" "/etc/machine-id"
"/root/.zsh_history"
]; ];
}; };

View File

@@ -2,7 +2,10 @@
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autocd = true; autocd = true;
history.expireDuplicatesFirst = true; history = {
path = "$HOME/.local/share/zsh/history";
expireDuplicatesFirst = true;
};
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;

View File

@@ -72,10 +72,10 @@ in
"VMs" "VMs"
"git" "git"
".mozilla" ".mozilla"
".local/share/zsh"
]; ];
files = [ files = [
".zsh_history" ".local/share/sops-nix/key.txt"
".key.txt"
]; ];
allowOther = true; allowOther = true;
}; };