diff options
author | Linnnus <[email protected]> | 2024-08-27 13:59:51 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-08-27 14:10:47 +0200 |
commit | 8cb5c75a832d2a76f02aaed144cbe91574a54d1d (patch) | |
tree | 90eabaae8c1fd8498034778bb934b9060fc72a25 | |
parent | 665a8a04c5d92325d8be08fc069debaec2abf479 (diff) |
ahmed: Don't attempt to fetch linus.onl source before network is online
I thought this restriction was already being enforced since I set
systemd.services."${domain}-source".after = ["network-online.target"]
but that apparently wasn't enough. I had to also ensure the timer, which
triggered the service was ordered after "network-online.target".
-rw-r--r-- | hosts/ahmed/linus.onl/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hosts/ahmed/linus.onl/default.nix b/hosts/ahmed/linus.onl/default.nix index c31eb73..3c4f7a6 100644 --- a/hosts/ahmed/linus.onl/default.nix +++ b/hosts/ahmed/linus.onl/default.nix @@ -44,7 +44,6 @@ in { User = "${domain}-builder"; Group = "${domain}-builder"; }; - startAt = "*-*-* *:00/5:00"; path = with pkgs; [ git @@ -77,6 +76,14 @@ in { wantedBy = ["nginx.service"]; }; + # Start the source fetching shit only after network acess has been achieved. + systemd.timers."${domain}-source" = { + after = ["network-online.target"]; + requires = ["network-online.target"]; + wantedBy = ["timers.target"]; + timerConfig.OnCalendar = ["*-*-* *:00/5:00"]; + }; + # Register domain name with ddns. services.cloudflare-dyndns.domains = [domain]; |