mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
nix: fix useDaemon conditions
The nix.useDaemon option enables using a multi-user install without managing the nix installation with nix-darwin. The following checks apply to both cases.
This commit is contained in:
parent
2415dd6e42
commit
8c2b25e60d
3 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ let
|
|||
# WARNING: this file is generated from the nix.* options in
|
||||
# your NixOS configuration, typically
|
||||
# /etc/nixos/configuration.nix. Do not edit it!
|
||||
${optionalString config.services.nix-daemon.enable ''
|
||||
${optionalString cfg.useDaemon ''
|
||||
build-users-group = nixbld
|
||||
''}
|
||||
${if isNix20 then "max-jobs" else "build-max-jobs"} = ${toString (cfg.maxJobs)}
|
||||
|
|
|
@ -41,7 +41,7 @@ in
|
|||
|
||||
launchd.daemons.nix-gc = {
|
||||
command = "${config.nix.package}/bin/nix-collect-garbage ${cfg.options}";
|
||||
environment.NIX_REMOTE = optionalString config.services.nix-daemon.enable "daemon";
|
||||
environment.NIX_REMOTE = optionalString config.nix.useDaemon "daemon";
|
||||
serviceConfig.RunAtLoad = false;
|
||||
serviceConfig.StartCalendarInterval = [ cfg.interval ];
|
||||
serviceConfig.UserName = cfg.user;
|
||||
|
|
|
@ -169,7 +169,7 @@ in
|
|||
system.checks.text = mkMerge [
|
||||
darwinChanges
|
||||
runLink
|
||||
(mkIf config.services.nix-daemon.enable buildUsers)
|
||||
(mkIf config.nix.useDaemon buildUsers)
|
||||
nixStore
|
||||
(mkIf (config.nix.gc.automatic && config.nix.gc.user == null) nixGarbageCollector)
|
||||
nixChannels
|
||||
|
|
Loading…
Add table
Reference in a new issue