diff --git a/profiles/wg-clerie/default.nix b/profiles/wg-clerie/default.nix index b6a6bf7..a845187 100644 --- a/profiles/wg-clerie/default.nix +++ b/profiles/wg-clerie/default.nix @@ -40,10 +40,12 @@ in }; systemd.network.config.addRouteTablesToIPRoute2 = true; - sops.secrets.wg-clerie = { - owner = "systemd-network"; - group = "systemd-network"; - }; + sops = (mkIf (cfg.privateKeyFile == null) { + secrets.wg-clerie = { + owner = "systemd-network"; + group = "systemd-network"; + }; + }); systemd.network.netdevs."10-wg-clerie" = { netdevConfig = {