1
0

hosts/aluminium: enable new wg-clerie module

This commit is contained in:
clerie 2023-09-15 20:24:25 +02:00
parent 33b6731c59
commit 6fced94cb5

View File

@ -21,39 +21,11 @@
networking.hostName = "aluminium"; networking.hostName = "aluminium";
networking.iproute2.enable = true; services.wg-clerie = {
networking.iproute2.rttablesExtraConfig = ''
200 wg-clerie
'';
petabyte.policyrouting = {
enable = true; enable = true;
rules6 = [ ipv6s = [ "2a01:4f8:c0c:15f1::8106/128" ];
{ rule = "from 2a01:4f8:c0c:15f1::8106/128 lookup wg-clerie"; prio = 20000; } ipv4s = [ "10.20.30.106/32" ];
{ rule = "from 2a01:4f8:c0c:15f1::8106/128 unreachable"; prio = 20001; } privateKeyFile = "/var/src/secrets/wireguard/wg-clerie";
];
rules4 = [
{ rule = "from 10.20.30.106/32 lookup wg-clerie"; prio = 20000; }
{ rule = "from 10.20.30.106/32 unreachable"; prio = 20001; }
];
};
networking.wireguard.enable = true;
networking.wireguard.interfaces = {
wg-clerie = {
ips = [ "2a01:4f8:c0c:15f1::8106/128" "10.20.30.106/32" ];
table = "wg-clerie";
peers = [
{
endpoint = "vpn.clerie.de:51820";
persistentKeepalive = 25;
allowedIPs = [ "0.0.0.0/0" "::/0" "10.20.30.0/24" "2a01:4f8:c0c:15f1::/113" ];
publicKey = "2p1Jqs3bkXbXHFWE6vp1yxHIFoUaZQEARS2nJzbkuBA=";
}
];
privateKeyFile = "/var/src/secrets/wireguard/wg-clerie";
};
}; };
clerie.monitoring = { clerie.monitoring = {