zsh: respect xdg.enable for dotDir

Make sure we actually respect a user's `xdg.enable` preference.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-12-27 13:12:11 -06:00
parent ea6dfabe3c
commit f84f474c1b
4 changed files with 43 additions and 5 deletions

View file

@ -130,6 +130,13 @@ let
stateVersion = lib.mkDefault "18.09";
};
# NOTE: Added 2025-12-27
# Avoid option change deprecation warning
# Remove after deprecation period
programs.zsh.dotDir = lib.mkIf (config.home.stateVersion == "18.09") (
lib.mkDefault "/home/hm-user"
);
# Avoid including documentation since this will cause
# unnecessary rebuilds of the tests.
manual.manpages.enable = lib.mkDefault false;

View file

@ -99,7 +99,7 @@ in
"assertFileExists 'home-files/${if relDotDir == "" then "" else "${relDotDir}/"}.zshenv'"
# for non-default dotDir only:
(lib.optionalString (case != "default" && case != "root-slash" && case != "root-no-slash") ''
(lib.optionalString (absDotDir != home) ''
# check .zshenv in homeDirectory sources .zshenv in dotDir
assertFileRegex home-files/.zshenv "source ${lib.escapeShellArg "${absDotDir}/.zshenv"}"