From 2f876a6275796dfbbb879cb434f10d321ffd1005 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Tue, 14 Nov 2023 21:01:58 +0100 Subject: ahmed: Make DynDNS wait for network online --- hosts/ahmed/configuration.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'hosts/ahmed') diff --git a/hosts/ahmed/configuration.nix b/hosts/ahmed/configuration.nix index f987686..9fd4bd5 100644 --- a/hosts/ahmed/configuration.nix +++ b/hosts/ahmed/configuration.nix @@ -70,13 +70,19 @@ defaults.email = "linusvejlo+${config.networking.hostName}-acme@gmail.com"; }; - # Configure DDNS. The website for each module is responsible for extending `services.cloudflare-dyndns.domains` with its domain. + # Configure DDNS. The website for each module is responsible for extending + # `services.cloudflare-dyndns.domains` with its domain. age.secrets.cloudflare-dyndns-api-token.file = ../../secrets/cloudflare-ddns-token.env.age; services.cloudflare-dyndns = { enable = true; apiTokenFile = config.age.secrets.cloudflare-dyndns-api-token.path; proxied = true; }; + # We also have to overwrite the dependencies of the DYNDNS client service to + # make sure we are *actually* online. + # + # See: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget + systemd.services.cloudflare-dyndns.after = [ "network-online.target" ]; # Listen for HTTP connections. networking.firewall.allowedTCPPorts = [80 443]; -- cgit v1.2.3