This commit is contained in:
catvayor 2024-10-13 12:55:30 +02:00
parent 083d2646f5
commit 8c27ed2f40
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
2 changed files with 55 additions and 1 deletions

View file

@ -4,6 +4,7 @@
pkgs, pkgs,
mods, mods,
sources, sources,
nodes,
... ...
}: }:
@ -13,6 +14,17 @@
# ./router.nix # ./router.nix
]; ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
fileSystems."/tmp" = {
fsType = "tmpfs";
device = "tmpfs";
options = [
"nosuid"
"nodev"
"relatime"
"size=12G"
];
};
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -27,7 +39,43 @@
]; ];
}; };
}; };
systemd.network.wait-online.anyInterface = true; kat.wireguardPubKey = "zIHvCSzk5a94jvnXU4iscbp9RUGzbWpARDMRgHNtMl4=";
systemd.network = {
wait-online.anyInterface = true;
networks."50-wg0" = {
name = "wg0";
address = [
"10.10.10.13/24"
"10.42.1.1/16"
];
};
netdevs."50-wg0" = {
netdevConfig = {
Name = "wg0";
Kind = "wireguard";
};
wireguardConfig.PrivateKeyFile = "/wg/private.key";
wireguardPeers = [
{
AllowedIPs = [
"10.10.10.0/24"
];
PublicKey = "CzUK0RPHsoG9N1NisOG0u7xwyGhTZnjhl7Cus3X76Es=";
Endpoint = "129.199.129.76:1194";
PersistentKeepalive = 25;
}
{
AllowedIPs = [
"10.42.0.0/16"
];
PublicKey = nodes.kat-watcher.config.kat.wireguardPubKey;
Endpoint = "watcher.katvayor.net:1194";
PersistentKeepalive = 25;
}
];
};
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View file

@ -77,6 +77,12 @@
]; ];
PublicKey = nodes.kat-manah.config.kat.wireguardPubKey; PublicKey = nodes.kat-manah.config.kat.wireguardPubKey;
} }
{
AllowedIPs = [
"10.42.1.1/32"
];
PublicKey = nodes.kat-probook.config.kat.wireguardPubKey;
}
]; ];
}; };
}; };