From 390c8c66a1b06498382a2d1acef0659eaf6fdae5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <cynerd@email.cz>
Date: Sun, 19 Jan 2025 15:05:04 +0100
Subject: nixos: reload pppd when networkd is reloaded

This should fix issue where nixos deploy reloads networkd and that
removes IPv4 address.
---
 nixos/configurations/adm-omnia.nix | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'nixos/configurations/adm-omnia.nix')

diff --git a/nixos/configurations/adm-omnia.nix b/nixos/configurations/adm-omnia.nix
index e472432..ebbb35f 100644
--- a/nixos/configurations/adm-omnia.nix
+++ b/nixos/configurations/adm-omnia.nix
@@ -120,7 +120,10 @@ in {
       password 02
     '';
   };
-  systemd.services."pppd-wan".after = ["sys-subsystem-net-devices-end2.device"];
+  systemd.services."pppd-wan" = {
+    after = ["sys-subsystem-net-devices-end2.device"];
+    partOf = ["systemd-networkd.service"];
+  };
   # TODO limit NSS clamping to just pppoe-wan
   networking.firewall.extraForwardRules = ''
     tcp flags syn tcp option maxseg size set rt mtu comment "Needed for PPPoE to fix IPv4"
-- 
cgit v1.2.3