mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-16 05:18:17 +00:00
nix-daemon: fix activation script
This commit is contained in:
parent
2e7ee7fc5d
commit
39827d4335
2 changed files with 10 additions and 9 deletions
|
@ -5,6 +5,7 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.nix;
|
cfg = config.nix;
|
||||||
|
daemon = config.services.nix-daemon;
|
||||||
|
|
||||||
nixConf =
|
nixConf =
|
||||||
let
|
let
|
||||||
|
@ -19,7 +20,7 @@ let
|
||||||
# WARNING: this file is generated from the nix.* options in
|
# WARNING: this file is generated from the nix.* options in
|
||||||
# your NixOS configuration, typically
|
# your NixOS configuration, typically
|
||||||
# /etc/nixos/configuration.nix. Do not edit it!
|
# /etc/nixos/configuration.nix. Do not edit it!
|
||||||
${optionalString config.services.nix-daemon.enable ''
|
${optionalString daemon.enable ''
|
||||||
build-users-group = nixbld
|
build-users-group = nixbld
|
||||||
''}
|
''}
|
||||||
build-max-jobs = ${toString cfg.maxJobs}
|
build-max-jobs = ${toString cfg.maxJobs}
|
||||||
|
@ -356,5 +357,13 @@ in
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
system.activationScripts.nix-daemon.text = mkIf daemon.enable ''
|
||||||
|
buildUser=$(dscl . -read /Groups/nixbld 2>&1 | awk '/^GroupMembership: / {print $2}')
|
||||||
|
if [ -z $buildUser ]; then
|
||||||
|
echo "Using the nix-daemon requires build users, aborting activation" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,13 +51,5 @@ in
|
||||||
// { TMPDIR = "${cfg.tempDir}"; };
|
// { TMPDIR = "${cfg.tempDir}"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.nix-daemon.text = mkIf cfg.enable ''
|
|
||||||
buildUser=$(dscl . -read /Groups/nixbld 2>&1 | awk '/^GroupMembership: / {print $2}')
|
|
||||||
if [ -z $buildUser ]; then
|
|
||||||
echo "Using the nix-daemon requires build users, aborting activation" >&2
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue