hosts/backup-4,hosts/palladium: Setup direct VPN tunnel for backups
This commit is contained in:
38
hosts/palladium/wg-b-palladium.nix
Normal file
38
hosts/palladium/wg-b-palladium.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
|
||||
sops = {
|
||||
secrets.wg-b-palladium = {
|
||||
owner = "systemd-network";
|
||||
group = "systemd-network";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.netdevs."10-wg-b-palladium" = {
|
||||
netdevConfig = {
|
||||
Kind = "wireguard";
|
||||
Name = "wg-b-palladium";
|
||||
};
|
||||
wireguardConfig = {
|
||||
PrivateKeyFile = config.sops.secrets.wg-b-palladium.path;
|
||||
};
|
||||
wireguardPeers = [
|
||||
{
|
||||
PublicKey = "VstE42L1SmZCIShH5sOqcpVQOV0Xb9cFgljD0lhvKFQ=";
|
||||
AllowedIPs = [ "fd90:37fd:ddec:d921::/64" ];
|
||||
PersistentKeepalive = 25;
|
||||
Endpoint = "backup-4.net.clerie.de:51844";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.network.networks."10-wg-b-palladium" = {
|
||||
matchConfig.Name = "wg-b-palladium";
|
||||
address = [
|
||||
"fd90:37fd:ddec:d921::2/64"
|
||||
];
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user