nix-gc.timer: Fix the start time

This commit is contained in:
Eelco Dolstra 2013-03-28 13:35:07 +01:00
parent 7ad91f31d6
commit c2977f134e

@ -21,7 +21,7 @@ in
};
dates = mkOption {
default = "00:43";
default = "03:15";
type = types.uniq types.string;
description = ''
Specification (in the format described by
@ -48,18 +48,22 @@ in
###### implementation
config = {
config = mkMerge [
#systemd.timers.nix-gc.enable = cfg.automatic;
systemd.timers.nix-gc.enable = true;
systemd.timers.nix-gc.timerConfig.OnCalendar = cfg.dates;
{ systemd.services.nix-gc =
{ description = "Nix Garbage Collector";
path = [ config.environment.nix ];
script = "exec nix-collect-garbage ${cfg.options}";
};
}
systemd.services.nix-gc =
{ description = "Nix Garbage Collector";
path = [ config.environment.nix ];
script = "exec nix-collect-garbage ${cfg.options}";
};
(mkIf cfg.automatic {
systemd.timers.nix-gc =
{ wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = cfg.dates;
};
})
};
];
}