mirror of https://github.com/rapenne-s/bento
utils: use startAt in bento-upgrade service to auto create the timer
This commit is contained in:
parent
a8ab5c476d
commit
2392b7720f
|
@ -5,18 +5,9 @@
|
|||
}: let
|
||||
timer = "*:0/15";
|
||||
in {
|
||||
systemd.timers.bento-upgrade = {
|
||||
enable = true;
|
||||
timerConfig = {
|
||||
OnCalendar = "${timer}";
|
||||
Unit = "bento-upgrade.service";
|
||||
};
|
||||
wantedBy = ["timers.target"];
|
||||
after = ["network-online.target"];
|
||||
};
|
||||
|
||||
systemd.services.bento-upgrade = {
|
||||
enable = true;
|
||||
startAt = "${timer}";
|
||||
path = with pkgs; [openssh git nixos-rebuild nix gzip];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
|
|
Loading…
Reference in New Issue