2024-08-24 22:13:53 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
flake,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
wireguardIPv4 = "10.7.6.6";
|
|
|
|
wireguardIPv6 = "fd00:fae:fae:fae:fae:6::";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
|
|
|
|
|
|
|
age.secrets.wg-private-key.file = "${flake.self}/secrets/delite-wg-private-key.age";
|
|
|
|
|
|
|
|
networking.wireguard.interfaces = {
|
|
|
|
wg-ssh = {
|
|
|
|
listenPort = 51820;
|
|
|
|
mtu = 1300;
|
|
|
|
ips = [
|
|
|
|
"${wireguardIPv4}/32"
|
|
|
|
"${wireguardIPv6}/96"
|
|
|
|
];
|
|
|
|
privateKeyFile = config.age.secrets.wg-private-key.path;
|
2024-11-12 19:32:00 +00:00
|
|
|
peers = flake.self.logins.wireguardDevices ++ [
|
2024-08-24 22:13:53 +00:00
|
|
|
{
|
2024-09-09 15:22:57 +00:00
|
|
|
# trinkgenossin.pub.solar
|
|
|
|
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
|
2024-08-24 22:13:53 +00:00
|
|
|
allowedIPs = [
|
2024-09-09 15:22:57 +00:00
|
|
|
"10.7.6.5/32"
|
|
|
|
"fd00:fae:fae:fae:fae:5::/96"
|
2024-08-24 22:13:53 +00:00
|
|
|
];
|
2024-09-27 09:56:46 +00:00
|
|
|
#endpoint = "85.215.152.22:51820";
|
2024-09-09 15:22:57 +00:00
|
|
|
endpoint = "[2a01:239:35d:f500::1]:51820";
|
|
|
|
persistentKeepalive = 15;
|
2024-08-24 22:13:53 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh.listenAddresses = [
|
|
|
|
{
|
|
|
|
addr = wireguardIPv4;
|
|
|
|
port = 22;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
addr = "[${wireguardIPv6}]";
|
|
|
|
port = 22;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|