Reformat everything
All checks were successful
/ test (push) Successful in 32s

This commit is contained in:
Andrea Ciceri 2024-09-20 11:37:17 +02:00
parent 5f644d0ccd
commit a394b9cefd
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
167 changed files with 2795 additions and 2122 deletions

View file

@ -3,20 +3,19 @@
lib,
vpn,
...
}: {
imports = [../wireguard-common];
}:
{
imports = [ ../wireguard-common ];
networking.nat.enable = true;
networking.firewall.allowedUDPPorts = [config.networking.wireguard.interfaces.wg0.listenPort]; # FIXME move this to wireguard-server
networking.firewall.allowedUDPPorts = [ config.networking.wireguard.interfaces.wg0.listenPort ]; # FIXME move this to wireguard-server
networking.wireguard.interfaces.wg0 = {
ips = ["${vpn.${config.networking.hostName}.ip}/24"];
peers =
lib.mapAttrsToList (hostname: vpnConfig: {
publicKey = vpnConfig.publicKey;
allowedIPs = ["${vpnConfig.ip}/32"];
})
vpn;
ips = [ "${vpn.${config.networking.hostName}.ip}/24" ];
peers = lib.mapAttrsToList (_hostname: vpnConfig: {
publicKey = vpnConfig.publicKey;
allowedIPs = [ "${vpnConfig.ip}/32" ];
}) vpn;
};
}