Maybe unfinished support for wireguard Nix clients

This commit is contained in:
jimjam4real 2024-09-23 13:49:48 -04:00
parent 8a27361843
commit 040d7392dc
5 changed files with 40 additions and 10 deletions

View file

@ -14,21 +14,23 @@ in {
networking.wireguard = {
enable = true;
interfaces = {
# Wireguard interface name can be arbitrary
wg0 = {
# Determines the IP and subnet of the tunnel interface
"${ips.wgInt}" = {
ips = [ "${ips.wgSpan}.1/24" ];
listenPort = 51820;
privateKey = outputs.secrets.wireguardPriv;
privateKey = outputs.secrets.wgServerPriv;
peers = [
{ # Jimbo Pixel 9
publicKey = outputs.secrets.wirePixel9Pub;
publicKey = outputs.secrets.wgPixel9Pub;
allowedIPs = [ "${ips.wgSpan}.2/32" ];
}
{ # Oracle VM
publicKey = outputs.secrets.wireOraclePub;
publicKey = outputs.secrets.wgOraclePub;
allowedIPs = [ "${ips.wgSpan}.3/32" ];
}
{ # General Nix
publicKey = outputs.secrets.wgClientPub;
allowedIPs = [ "${ips.wgSpan}.16/28" ];
}
];
};
};