diff --git a/nixos/modules/services/networking/wireguard-networkd.nix b/nixos/modules/services/networking/wireguard-networkd.nix index 931f3305594c..ad7de97f1e5a 100644 --- a/nixos/modules/services/networking/wireguard-networkd.nix +++ b/nixos/modules/services/networking/wireguard-networkd.nix @@ -14,7 +14,12 @@ let mapAttrsToList nameValuePair ; - inherit (lib.lists) concatMap concatLists filter; + inherit (lib.lists) + concatMap + concatLists + filter + flatten + ; inherit (lib.modules) mkIf; inherit (lib.options) literalExpression mkOption; inherit (lib.strings) hasInfix; @@ -215,7 +220,9 @@ in systemd.timers = mapAttrs' generateRefreshTimer refreshEnabledInterfaces; systemd.services = (mapAttrs' generateRefreshService refreshEnabledInterfaces) // { - systemd-networkd.serviceConfig.LoadCredential = mapAttrsToList interfaceCredentials cfg.interfaces; + systemd-networkd.serviceConfig.LoadCredential = flatten ( + mapAttrsToList interfaceCredentials cfg.interfaces + ); }; }; }