home-environment: allow skipping sanity checks

See https://github.com/nix-community/home-manager/issues/4019#issuecomment-1568659267
This commit is contained in:
Robert Helgesson 2023-06-21 00:46:30 +02:00
parent 1b61530608
commit 9a76fb9a85
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -711,8 +711,10 @@ in
${builtins.readFile ./lib-bash/activation-init.sh}
checkUsername ${escapeShellArg config.home.username}
checkHomeDirectory ${escapeShellArg config.home.homeDirectory}
if [[ ! -v SKIP_SANITY_CHECKS ]]; then
checkUsername ${escapeShellArg config.home.username}
checkHomeDirectory ${escapeShellArg config.home.homeDirectory}
fi
${activationCmds}
'';