2018-06-21 13:22:12 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2022-08-14 21:16:56 +00:00
|
|
|
nix = pkgs.runCommand "nix-2.2" {} "mkdir -p $out";
|
2018-06-21 13:22:12 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
services.nix-daemon.enableSocketListener = true;
|
|
|
|
nix.package = nix;
|
2020-04-14 21:53:31 +00:00
|
|
|
launchd.labelPrefix = "org.nix-darwin"; # should not have an effect on nix-daemon
|
2018-06-21 13:22:12 +00:00
|
|
|
|
|
|
|
test = ''
|
|
|
|
echo checking nix-daemon service in /Library/LaunchDaemons >&2
|
|
|
|
grep "<string>org.nixos.nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
2020-02-24 21:34:18 +00:00
|
|
|
grep "<string>/bin/wait4path" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
|
|
|
grep "&&" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
|
|
|
grep "exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
2023-08-03 08:47:58 +00:00
|
|
|
(! grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist)
|
2018-06-21 13:22:12 +00:00
|
|
|
grep "<key>Sockets</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
|
|
|
grep "/nix/var/nix/daemon-socket/socket" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
|
|
|
'';
|
|
|
|
}
|