Setup Wireguard configuration

This commit is contained in:
2026-06-29 11:24:19 +02:00
parent 23ecd70457
commit cbfb1fef0e
13 changed files with 144 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
{ config, hostName, ... }:
{
sops.secrets."wireguard/${hostName}" = {
mode = "0400";
};
networking = {
wireguard.interfaces.wg0 = {
privateKeyFile = config.sops.secrets."wireguard/${hostName}".path;
};
firewall.allowedUDPPorts = [ 51820 ];
};
}