From 0688b5ad70ba0a3636dbf401c758b3753de8ec36 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 4 Jun 2020 13:33:54 +0200 Subject: zsh: move history (with migration path) --- user/settings/zsh.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'user/settings') 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; -- cgit 1.4.1