1
0
Fork 0

modules/clerie-system-upgrade: fix systemd unit deps

This commit is contained in:
clerie 2024-03-19 19:41:22 +01:00
parent 62dd3b7471
commit fa712fa1c5
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,9 @@ in
};
config = mkIf cfg.enable {
systemd.services.clerie-system-auto-upgrade = {
requires = [ "network-online.target" ];
after = [ "network-online.target" ];
# Make sure this unit does not stop themself while upgrading
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
@ -44,6 +47,7 @@ in
OnCalendar = if cfg.startAt == null then "*-*-* 05:37:00" else cfg.startAt;
RandomizedDelaySec = if cfg.startAt == null then "2h" else "10m";
};
requires = [ "network-online.target" ];
after = [ "network-online.target" ];
};
environment.systemPackages = with pkgs; [