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

View File

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