diff options
author | Alan Pearce | 2020-06-04 13:33:54 +0200 |
---|---|---|
committer | Alan Pearce | 2020-06-04 13:33:54 +0200 |
commit | 0688b5ad70ba0a3636dbf401c758b3753de8ec36 (patch) | |
tree | 4e09dbb75b9859e147232ad475a5a017d1bb7990 /user/settings | |
parent | 5741c855a066ed7e06f1a957ff11774b7cef9dda (diff) | |
download | nixfiles-0688b5ad70ba0a3636dbf401c758b3753de8ec36.tar.lz nixfiles-0688b5ad70ba0a3636dbf401c758b3753de8ec36.tar.zst nixfiles-0688b5ad70ba0a3636dbf401c758b3753de8ec36.zip |
zsh: move history (with migration path)
Diffstat (limited to 'user/settings')
-rw-r--r-- | user/settings/zsh.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix index f0030b0c..0efda5de 100644 --- a/user/settings/zsh.nix +++ b/user/settings/zsh.nix @@ -29,6 +29,12 @@ in 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 @@ in history = { expireDuplicatesFirst = true; extended = true; - path = ".cache/zsh/history"; + path = "\${XDG_DATA_HOME#$HOME/}/zsh/history"; save = 20000; size = 10000; share = false; |