1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 18:59:44 +01:00
home-manager/tests/modules/services/nix-gc/basic.nix

30 lines
591 B
Nix
Raw Normal View History

{ ... }:
{
nix.gc = {
automatic = true;
frequency = "monthly";
options = "--delete-older-than 30d";
};
test.stubs.nix = { name = "nix"; };
nmt.script = ''
serviceFile=home-files/.config/systemd/user/nix-gc.service
assertFileExists $serviceFile
serviceFile=$(normalizeStorePaths $serviceFile)
assertFileContent $serviceFile ${./expected.service}
timerFile=home-files/.config/systemd/user/nix-gc.timer
assertFileExists $timerFile
timerFile=$(normalizeStorePaths $timerFile)
assertFileContent $timerFile ${./expected.timer}
'';
}