1
0
Fork 0
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:
Daiderd Jordan 2019-07-01 21:14:14 +02:00
parent 2415dd6e42
commit 8c2b25e60d
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 3 additions and 3 deletions

View file

@ -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)}

View file

@ -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;

View file

@ -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