clanServices/wireguard: add networking exports to controllers

Part of https://git.clan.lol/clan/clan-core/issues/5549
This commit is contained in:
pinpox
2025-10-31 12:30:12 +01:00
parent 196b98da36
commit 97f5ffd813

View File

@@ -56,6 +56,8 @@
{
clanLib,
lib,
directory,
...
}:
let
@@ -298,6 +300,18 @@ in
...
}:
{
exports.networking = {
peers = lib.mapAttrs (name: _machine: {
host.plain =
clanLib.vars.getPublicValue {
flake = directory;
machine = name;
generator = "wireguard-network-${instanceName}";
file = "prefix";
}
+ "::1";
}) roles.controller.machines;
};
# Controllers connect to all peers and other controllers
nixosModule =