feat(heimdall+desktop): setup wireguard tunnel.

This commit is contained in:
CronyAkatsuki 2025-05-04 18:11:15 +02:00
parent be539374c0
commit 5fa7edbc18
10 changed files with 63 additions and 13 deletions

View file

@ -2,5 +2,7 @@
imports = [
./uptime-kuma.nix
./ntfy-sh.nix
./wireguard.nix
./secrets.nix
];
}

View file

@ -0,0 +1,9 @@
{
age = {
secrets = {
wg-heimdall = {
file = ../../../secrets/wg-heimdall.age;
};
};
};
}

View file

@ -0,0 +1,24 @@
{config, ...}: {
networking = {
nat = {
enable = true;
enableIPv6 = true;
externalInterface = "enp1s0";
internalInterfaces = ["wg0"];
};
firewall = {
allowedTCPPorts = [53];
allowedUDPPorts = [53 51820];
};
wg-quick.interfaces.wg0.configFile = "${config.age.secrets.wg-heimdall.path}";
};
services.dnsmasq = {
enable = true;
settings = {
interface = "wg0";
};
};
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
}