home-server/services/wireguard-inner.nix
Ellie b8402a9049 Initial commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:57:00 -08:00

24 lines
584 B
Nix

{ config, ... }:
{
sops.secrets."wireguard/private_key" = {
sopsFile = ./secrets/wireguard_home.yaml;
mode = "0400";
};
networking.firewall.allowedUDPPorts = [ 51820 ];
networking.wireguard.interfaces."wg0" = {
ips = [ "10.10.0.2/24" ];
privateKeyFile = config.sops.secrets."wireguard/private_key".path;
listenPort = 51820;
peers = [
{
publicKey = "9itF3RfEP/DhK1C1288njiCQg0AMjjvRsWDYGyNj0ns=";
endpoint = "23.88.105.213:51820";
allowedIPs = [ "10.10.0.1/32" ];
persistentKeepalive = 25;
}
];
};
}