nixos/hydron: Various tweaks

Make timer persistent
Start timer after hydron
Change interval from hourly to weekly
This commit is contained in:
Okina Matara 2018-08-14 23:19:31 -05:00
parent 44a4370b1f
commit aba87b85ef

View File

@ -16,10 +16,10 @@ in with lib; {
interval = mkOption {
type = types.str;
default = "hourly";
default = "weekly";
example = "06:00";
description = ''
How often we run hydron import and possibly fetch tags. Runs by default every hour.
How often we run hydron import and possibly fetch tags. Runs by default every week.
The format is described in
<citerefentry><refentrytitle>systemd.time</refentrytitle>
@ -137,9 +137,13 @@ in with lib; {
systemd.timers.hydron-fetch = {
description = "Automatically import paths into hydron and possibly fetch tags";
after = [ "network.target" ];
after = [ "network.target" "hydron.service" ];
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = cfg.interval;
timerConfig = {
Persistent = true;
OnCalendar = cfg.interval;
};
};
users = {