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
|
}: let
|
||||||
timer = "*:0/15";
|
timer = "*:0/15";
|
||||||
in {
|
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 = {
|
systemd.services.bento-upgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
startAt = "${timer}";
|
||||||
path = with pkgs; [openssh git nixos-rebuild nix gzip];
|
path = with pkgs; [openssh git nixos-rebuild nix gzip];
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
script = ''
|
script = ''
|
||||||
|
|
Loading…
Reference in New Issue