Persist zsh history better

This commit is contained in:
Alexander Bantyev 2021-06-09 01:00:13 +03:00
parent fbc3d2ccb7
commit 33cb845cb1
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,8 @@
}; };
}; };
persist.state.directories = [ "/home/balsoft/.config/Yubico" ];
services.udev.extraRules = '' services.udev.extraRules = ''
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions" ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
''; '';

View File

@ -3,7 +3,8 @@
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
environment.sessionVariables.SHELL = "zsh"; environment.sessionVariables.SHELL = "zsh";
persist.state.homeFiles = [ ".zsh_history" ]; # A history file is screwed up otherwise :(
persist.state.directories = [ "/home/balsoft/.config/zsh/history" ];
home-manager.users.balsoft.programs.zsh = { home-manager.users.balsoft.programs.zsh = {
enable = true; enable = true;
@ -15,9 +16,12 @@
plugins = [ "git" "dirhistory" ]; plugins = [ "git" "dirhistory" ];
}; };
dotDir = ".config/zsh";
history = rec { history = rec {
size = 1000000; size = 1000000;
save = size; save = size;
path = "$HOME/.config/zsh/history/file";
}; };
plugins = [ plugins = [
{ {