mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
parent
9a65d60811
commit
74c27037e6
2 changed files with 9 additions and 0 deletions
|
@ -51,5 +51,13 @@ in
|
|||
// { 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
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ in
|
|||
# Prevent the current configuration from being garbage-collected.
|
||||
ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
|
||||
|
||||
${cfg.activationScripts.nix-daemon.text}
|
||||
${cfg.activationScripts.nix.text}
|
||||
|
||||
${cfg.activationScripts.etc.text}
|
||||
|
|
Loading…
Add table
Reference in a new issue