1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

checks: factor out nix.useDaemon check

This commit is contained in:
Emily 2024-09-10 21:32:06 +01:00
parent 98189683a4
commit 2af5f0fb9e

View file

@ -242,7 +242,9 @@ in
system.checks.verifyBuildUsers = mkOption { system.checks.verifyBuildUsers = mkOption {
type = types.bool; type = types.bool;
default = !(config.nix.settings.auto-allocate-uids or false); default =
(config.nix.useDaemon && !(config.nix.settings.auto-allocate-uids or false))
|| config.nix.configureBuildUsers;
description = "Whether to run the Nix build users validation checks."; description = "Whether to run the Nix build users validation checks.";
}; };
@ -259,7 +261,7 @@ in
darwinChanges darwinChanges
runLink runLink
oldBuildUsers oldBuildUsers
(mkIf (config.nix.useDaemon && cfg.verifyBuildUsers) buildUsers) (mkIf cfg.verifyBuildUsers buildUsers)
(mkIf (!config.nix.useDaemon) singleUser) (mkIf (!config.nix.useDaemon) singleUser)
nixStore nixStore
(mkIf (config.nix.gc.automatic && config.nix.gc.user == null) nixGarbageCollector) (mkIf (config.nix.gc.automatic && config.nix.gc.user == null) nixGarbageCollector)