modules: secrets: move wireguard keys

This is a bit special, as some of the keys do not belong to NixOS hosts,
so store those in the module itself, and into host-specific directories
for the keys that are NixOS hosts.
This commit is contained in:
Bruno BELANYI 2023-04-16 19:43:39 +01:00
parent ed745602a1
commit 7cebaa3751
9 changed files with 19 additions and 7 deletions

View file

@ -12,7 +12,7 @@ let
let
mkPeer = name: attrs: {
inherit (attrs) clientNum publicKey;
privateKeyFile = secrets."wireguard/${name}/private-key".path;
privateKeyFile = secrets."wireguard/private-key".path;
} // lib.optionalAttrs (attrs ? externalIp) {
inherit (attrs) externalIp;
};