2024-05-05 18:53:09 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2022-09-14 03:53:30 +00:00
|
|
|
{
|
|
|
|
networking.wireguard.interfaces =
|
|
|
|
let
|
2024-05-05 18:53:09 +00:00
|
|
|
# homeip = lib.fileContents config.age.secrets.lab-ip.path;
|
|
|
|
# homeip = lib.fileContents ../../sensitives/homeip;
|
|
|
|
homeip = config.wireguard.lab.remote;
|
2022-09-14 03:53:30 +00:00
|
|
|
in {
|
2024-05-05 18:53:09 +00:00
|
|
|
# server = {
|
|
|
|
# ips = [ "10.0.0.2/32" ];
|
|
|
|
# listenPort = 2751;
|
|
|
|
#
|
|
|
|
# privateKeyFile = config.age.secrets.serverwg-priv.path;
|
|
|
|
#
|
|
|
|
# peers = [
|
|
|
|
# {
|
|
|
|
# publicKey = "Lk+EHt6+6HPUeXigdBTbv/j4yAcs2MyGumbgrOD5WTA=";
|
|
|
|
# allowedIPs = [ "10.0.0.1/32" ];
|
|
|
|
# endpoint = homeip + ":2751";
|
|
|
|
# persistentKeepalive = 25;
|
|
|
|
# }
|
|
|
|
# ];
|
|
|
|
# };
|
2022-09-14 03:53:30 +00:00
|
|
|
|
2024-05-05 18:53:09 +00:00
|
|
|
lab = {
|
|
|
|
ips = [ config.wireguard.lab.ip ];
|
2022-09-14 03:53:30 +00:00
|
|
|
listenPort = 2752;
|
|
|
|
|
2024-05-05 18:53:09 +00:00
|
|
|
privateKeyFile = config.wireguard.lab.privateKeyFile; #config.age.secrets.vpnboxwg-priv.path;
|
2022-09-14 03:53:30 +00:00
|
|
|
|
|
|
|
peers = [
|
|
|
|
{
|
|
|
|
publicKey = "JTHjRp35MUbNSMOQnuE99mg0D0tyiprhH1KgIIQQLmg=";
|
|
|
|
allowedIPs = [ "10.0.1.1/32" "192.168.87.0/24" ];
|
|
|
|
endpoint = homeip + ":2752";
|
|
|
|
persistentKeepalive = 25;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|