diff --git a/systems/LoutreOS/network.nix b/systems/LoutreOS/network.nix index 7bab14d..c42c405 100644 --- a/systems/LoutreOS/network.nix +++ b/systems/LoutreOS/network.nix @@ -107,6 +107,13 @@ }; }; + systemd.services.systemd-networkd.serviceConfig = { + LoadCredential = [ + "network.wireguard.private.wg0:/mnt/secrets/wireguard/wireguard.private" + "network.wireguard.preshared.wg0:/mnt/secrets/wireguard/wireguard.preshared" + ]; + }; + ################# # ROUTING RULES # ################# @@ -139,7 +146,9 @@ MTUBytes = "1450"; }; wireguardConfig = { - PrivateKeyFile = "/run/keys/wireguard-privkey"; + PrivateKeyFile = "/run/credentials/systemd-networkd.service/network.wireguard.private.wg0"; + # Wait for 24.11 + # PrivateKey = "@network.wireguard.private.wg0"; RouteTable = 3; }; wireguardPeers = [ @@ -147,7 +156,9 @@ wireguardPeerConfig = { Endpoint = "89.234.141.83:8095"; PublicKey = "t3+JkBfXI1uw8fa9P6JfxXJfTPm9cOHcgIN215UHg2g="; - PresharedKeyFile = "/run/keys/wireguard-psk.key"; + PresharedKeyFile = "/run/credentials/systemd-networkd.service/network.wireguard.preshared.wg0"; + # Wait for 24.11 + # PresharedKey = "@network.wireguard.preshared.wg0"; AllowedIPs = ["0.0.0.0/0" "::/0"]; PersistentKeepalive = 15; };