activation-script: default to skipping 'sanity' checks on darwin
this defaults to not checking that the `$HOME` env variable matches the nix config entry for that user. i think it's a safe assertion to make that given nix-darwin can't be used for from-first-boot host provisioning, a lot less people manage their user accounts with it. these "sanity" checks depend on the user in question being a fully managed user, which is otherwise unnecessary and caused some surprise breakages on home-manager updates.
This commit is contained in:
parent
f1d4f49e71
commit
b0ba638778
|
@ -711,6 +711,8 @@ in
|
|||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
: ''${SKIP_SANITY_CHECKS:=${ if pkgs.stdenvNoCC.isDarwin then "true" else "" }}
|
||||
|
||||
cd $HOME
|
||||
|
||||
export PATH="${activationBinPaths}"
|
||||
|
@ -718,7 +720,7 @@ in
|
|||
|
||||
${builtins.readFile ./lib-bash/activation-init.sh}
|
||||
|
||||
if [[ ! -v SKIP_SANITY_CHECKS ]]; then
|
||||
if [[ -z SKIP_SANITY_CHECKS ]]; then
|
||||
checkUsername ${escapeShellArg config.home.username}
|
||||
checkHomeDirectory ${escapeShellArg config.home.homeDirectory}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue