From 54cce2b59eab30faf29a973aebd50f69eb76c713 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Wed, 22 Jan 2025 09:10:36 +0000 Subject: [PATCH] Fix zsh Signed-off-by: Nikolaos Karaolidis --- hosts/common/configs/user/console/zsh/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hosts/common/configs/user/console/zsh/default.nix b/hosts/common/configs/user/console/zsh/default.nix index c3a11a9..e820075 100644 --- a/hosts/common/configs/user/console/zsh/default.nix +++ b/hosts/common/configs/user/console/zsh/default.nix @@ -4,7 +4,12 @@ }: { config, pkgs, ... }: { - environment.persistence."/persist"."${home}/.local/share/zsh" = { }; + environment = { + persistence."/persist"."${home}/.local/share/zsh" = { }; + # If we set this under home-manager.users.${user}.home.sessionVariables, + # it runs too late in the init process and zsh fails. + sessionVariables.ZDOTDIR = "$HOME/.config/zsh"; + }; home-manager.users.${user} = { imports = [ ./options.nix ]; @@ -33,9 +38,6 @@ ''; }; - home = { - file.".zshenv".enable = false; - sessionVariables.ZDOTDIR = "${home}/.config/zsh"; - }; + home.file.".zshenv".enable = false; }; }