Add wireguard to home connection

This commit is contained in:
Alexander Wainwright
2025-07-14 16:22:22 +10:00
parent 16c0d4db6f
commit f4a48bca84
2 changed files with 29 additions and 0 deletions

View File

@@ -19,6 +19,34 @@
networking.hostName = "case"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable WireGuard
networking.firewall = {
allowedUDPPorts = [ 51820 ];
};
networking.wireguard.enable = true;
networking.wg-quick.interfaces = {
wg-home = {
autostart = false;
address = [ "10.10.10.2/32" ];
listenPort = 51820;
privateKeyFile = "/home/alex/.config/wireguard/home.private.key";
peers = [
{
publicKey = "63/c6q5Jv4hNy5zC2psiBNEoAXsxKO4QsPPxrJSZXSk=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "figtree.dev:51820";
}
];
dns = [
"192.168.1.20"
"192.168.1.80"
];
};
};
# run locutus every hour
services.cron = {
enable = true;

View File

@@ -110,6 +110,7 @@
unzip
uv
wget
wireguard-tools
zip
binutils