From fa712fa1c51cf88545e0e6c7339406e0b6fdaaa0 Mon Sep 17 00:00:00 2001 From: clerie Date: Tue, 19 Mar 2024 19:41:22 +0100 Subject: [PATCH] modules/clerie-system-upgrade: fix systemd unit deps --- modules/clerie-system-upgrade/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/clerie-system-upgrade/default.nix b/modules/clerie-system-upgrade/default.nix index 2a83a11..b6c92ba 100644 --- a/modules/clerie-system-upgrade/default.nix +++ b/modules/clerie-system-upgrade/default.nix @@ -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; [