2019-01-03 23:50:14 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2022-08-14 21:16:56 +00:00
|
|
|
nix = pkgs.runCommand "nix-2.2" {} "mkdir -p $out";
|
2019-01-03 23:50:14 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
nix.package = nix;
|
|
|
|
|
|
|
|
test = ''
|
|
|
|
echo checking nix-gc validation >&2
|
|
|
|
grep "nix.gc.user = " ${config.out}/activate-user
|
|
|
|
|
|
|
|
echo checking nix-gc service in /Library/LaunchDaemons >&2
|
|
|
|
grep "<string>org.nixos.nix-gc</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
|
|
|
! grep "<key>UserName</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
|
|
|
'';
|
|
|
|
}
|