mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
checks: make oldBuildUsers
check fail hard
Checking for the Sequoia stuff won’t work properly if a system is still in this old state. Best to be loud about it to deal with any straggler systems that haven’t yet dealt with this issue.
This commit is contained in:
parent
2af5f0fb9e
commit
9c60c95008
1 changed files with 7 additions and 2 deletions
|
@ -46,12 +46,17 @@ let
|
||||||
|
|
||||||
oldBuildUsers = ''
|
oldBuildUsers = ''
|
||||||
if dscl . -list /Users | grep -q '^nixbld'; then
|
if dscl . -list /Users | grep -q '^nixbld'; then
|
||||||
echo "[1;31mwarning: Detected old style nixbld users[0m" >&2
|
echo "[1;31merror: Detected old style nixbld users, aborting activation[0m" >&2
|
||||||
echo "These can cause migration problems when upgrading to certain macOS versions" >&2
|
echo "These can cause migration problems when upgrading to certain macOS versions" >&2
|
||||||
echo "You can enable the following option to migrate to new style nixbld users" >&2
|
echo "You can enable the following option to migrate to new style nixbld users" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
echo " nix.configureBuildUsers = true;" >&2
|
echo " nix.configureBuildUsers = true;" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
|
echo "or disable this check with" >&2
|
||||||
|
echo >&2
|
||||||
|
echo " system.checks.verifyBuildUsers = false;" >&2
|
||||||
|
echo >&2
|
||||||
|
exit 2
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -260,7 +265,7 @@ in
|
||||||
system.checks.text = mkMerge [
|
system.checks.text = mkMerge [
|
||||||
darwinChanges
|
darwinChanges
|
||||||
runLink
|
runLink
|
||||||
oldBuildUsers
|
(mkIf (cfg.verifyBuildUsers && !config.nix.configureBuildUsers) oldBuildUsers)
|
||||||
(mkIf cfg.verifyBuildUsers buildUsers)
|
(mkIf cfg.verifyBuildUsers buildUsers)
|
||||||
(mkIf (!config.nix.useDaemon) singleUser)
|
(mkIf (!config.nix.useDaemon) singleUser)
|
||||||
nixStore
|
nixStore
|
||||||
|
|
Loading…
Reference in a new issue