1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-27 04:09:47 +01:00
home-manager/tests/modules/services/nix-gc-darwin/basic.nix
shivaraj-bh 6843538e68
nix-gc: add service
The nix-gc service runs automatically at a specified frequency. It is
managed via launchd on macOS and systemd on Linux.
2024-04-10 21:27:21 +02:00

19 lines
352 B
Nix

{ ... }:
{
nix.gc = {
automatic = true;
frequency = "monthly";
options = "--delete-older-than 30d";
};
test.stubs.nix = { name = "nix"; };
nmt.script = ''
serviceFile=LaunchAgents/org.nix-community.home.nix-gc.plist
assertFileExists "$serviceFile"
assertFileContent "$serviceFile" ${./expected-agent.plist}
'';
}