all repos — nixfiles @ cbc125670e86c7ce9419b6e84fefeaa5c6ef20b4

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

zsh: fix XDG_DATA_HOME error on first install
Alan Pearce alan@alanpearce.eu
Mon, 06 Jul 2020 12:48:18 +0200
commit

cbc125670e86c7ce9419b6e84fefeaa5c6ef20b4

parent

89af66a446fc3d04647d935a1540f0679986d84a

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M user/settings/zsh.nixuser/settings/zsh.nix
@@ -30,9 +30,9 @@ zsh-completions   ];
 
   home.activation.linkOldZshHistory = config.lib.dag.entryAfter ["writeBoundary"] ''
-    if [[ ! -f ''${XDG_DATA_HOME}/zsh/history ]]; then
-      mkdir -p ''${XDG_DATA_HOME}/zsh/
-      ln ~/.cache/zsh/history ''${XDG_DATA_HOME}/zsh/history
+    if [[ ! -f ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history ]]; then
+      mkdir -p ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/
+      ln ~/.cache/zsh/history ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history
     fi
   '';