1
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

View File

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