Add wireguard to home connection
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
unzip
|
||||
uv
|
||||
wget
|
||||
wireguard-tools
|
||||
zip
|
||||
|
||||
binutils
|
||||
|
||||
Reference in New Issue
Block a user