mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-06 08:47:00 +00:00
nix-gc: check for nix.enable
This was added to Nixpkgs in eb8b70c020e6693b29634660fa173d7f14f882eb.
This commit is contained in:
parent
a6746213b1
commit
fc9367a9ec
1 changed files with 8 additions and 3 deletions
|
@ -56,13 +56,18 @@ in
|
|||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.automatic {
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.automatic -> config.nix.enable;
|
||||
message = ''nix.gc.automatic requires nix.enable'';
|
||||
}
|
||||
];
|
||||
|
||||
launchd.daemons.nix-gc = {
|
||||
launchd.daemons.nix-gc = mkIf cfg.automatic {
|
||||
command = "${config.nix.package}/bin/nix-collect-garbage ${cfg.options}";
|
||||
serviceConfig.RunAtLoad = false;
|
||||
serviceConfig.StartCalendarInterval = cfg.interval;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue