summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2024-09-10 21:32:06 +0100
committerEmily <vcs@emily.moe>2024-09-11 00:37:08 +0100
commit9c60c95008e2862c45d01d3d453508f644adeff6 (patch)
treee4c7746065b32809a05c646d938cab12176e79f5 /modules
parent2af5f0fb9e554ea3c85e57d35a5f2ed5a10b8867 (diff)
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/system/checks.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/system/checks.nix b/modules/system/checks.nix
index 1cfe1c8..f2971c4 100644
--- a/modules/system/checks.nix
+++ b/modules/system/checks.nix
@@ -46,12 +46,17 @@ let
oldBuildUsers = ''
if dscl . -list /Users | grep -q '^nixbld'; then
- echo "warning: Detected old style nixbld users" >&2
+ echo "error: Detected old style nixbld users, aborting activation" >&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 >&2
echo " nix.configureBuildUsers = true;" >&2
echo >&2
+ echo "or disable this check with" >&2
+ echo >&2
+ echo " system.checks.verifyBuildUsers = false;" >&2
+ echo >&2
+ exit 2
fi
'';
@@ -260,7 +265,7 @@ in
system.checks.text = mkMerge [
darwinChanges
runLink
- oldBuildUsers
+ (mkIf (cfg.verifyBuildUsers && !config.nix.configureBuildUsers) oldBuildUsers)
(mkIf cfg.verifyBuildUsers buildUsers)
(mkIf (!config.nix.useDaemon) singleUser)
nixStore