Add wireguard to home connection
This commit is contained in:
parent
16c0d4db6f
commit
f4a48bca84
2 changed files with 29 additions and 0 deletions
|
|
@ -19,6 +19,34 @@
|
||||||
networking.hostName = "case"; # Define your hostname.
|
networking.hostName = "case"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# 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
|
# run locutus every hour
|
||||||
services.cron = {
|
services.cron = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@
|
||||||
unzip
|
unzip
|
||||||
uv
|
uv
|
||||||
wget
|
wget
|
||||||
|
wireguard-tools
|
||||||
zip
|
zip
|
||||||
|
|
||||||
binutils
|
binutils
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue