all repos — nixfiles @ 8c51d28b31f9fe4cbe1700644dd9af8657095c64

System and user configuration, managed by nix and home-manager

dynamic-dns: wait for wan to be online

Alin
commit

8c51d28b31f9fe4cbe1700644dd9af8657095c64

parent

987fcaf5050b33c2ec8c9d534199e1f579ec8228

2 files changed, 11 insertions(+), 0 deletions(-)

changed files
M system/hosts/r5.nix → system/hosts/r5.nix
@@ -110,6 +110,12 @@ "lan2"
]; }; }; + "40-${wan}" = { + matchConfig.Name = wan; + linkConfig = { + RequiredFamilyForOnline = "both"; + }; + }; }; };
M system/roles/dynamic-dns.nix → system/roles/dynamic-dns.nix
@@ -9,6 +9,7 @@ server = "pdns.${zone}";
domains = [ "home.${zone}" ]; + wan = config.networking.nat.externalInterface; in { age.secrets = {
@@ -22,6 +23,10 @@ inherit zone server domains;
protocol = "nsupdate"; passwordFile = config.age.secrets.dyndns.path; + }; + systemd.services.ddclient = { + wants = [ "systemd-networkd-wait-online@${wan}.service" ]; + after = [ "systemd-networkd-wait-online@${wan}.service" ]; }; networking.firewall = {