all repos — nixfiles @ 0688b5ad70ba0a3636dbf401c758b3753de8ec36

System and user configuration, managed by nix and home-manager

zsh: move history (with migration path)

Alan Pearce
commit

0688b5ad70ba0a3636dbf401c758b3753de8ec36

parent

5741c855a066ed7e06f1a957ff11774b7cef9dda

1 file changed, 7 insertions(+), 1 deletion(-)

jump to
M user/settings/zsh.nixuser/settings/zsh.nix
@@ -29,6 +29,12 @@ git-lfs
zsh-completions ]; + home.activation.linkOldZshHistory = config.lib.dag.entryAfter ["writeBoundary"] '' + if [[ ! -f ''${XDG_DATA_HOME}/zsh/history ]]; then + ln ${toString ./.cache/zsh/history} ''${XDG_DATA_HOME}/zsh/history + fi + ''; + programs.zsh = { enable = true;
@@ -41,7 +47,7 @@
history = { expireDuplicatesFirst = true; extended = true; - path = ".cache/zsh/history"; + path = "\${XDG_DATA_HOME#$HOME/}/zsh/history"; save = 20000; size = 10000; share = false;