Gonna revert and modify the original flake, add back overlays from a shared file, and figure things out after
This commit is contained in:
parent
65f90a0bf3
commit
4ad26636a7
17 changed files with 116 additions and 14 deletions
22
modules/system/devices/networking/wireguard/pc/default.nix
Normal file
22
modules/system/devices/networking/wireguard/pc/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ outputs, ... }:
|
||||
{
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [ 51820 ];
|
||||
};
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
"${outputs.ips.wgInt}" = {
|
||||
# Define IP of client in per device config
|
||||
listenPort = 51820;
|
||||
privateKey = outputs.secrets.wgClientPriv;
|
||||
peers = [
|
||||
{ # 0.0.0.0 makes wg act like a traditional VPN
|
||||
publicKey = outputs.secrets.wgServerPub;
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
endpoint = "sv.${outputs.secrets.jimDomain}:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue