2024-11-16 22:10:11 +05:30
|
|
|
{ config, ... }:
|
2024-11-16 19:00:06 +05:30
|
|
|
let
|
2024-11-16 22:10:11 +05:30
|
|
|
wireguard-peers = import ../../shared/wireguard-peers.nix;
|
2024-11-16 19:00:06 +05:30
|
|
|
in
|
|
|
|
{
|
2024-11-16 23:08:16 +05:30
|
|
|
nodeconfig.facts.wireguard-ip = "10.10.10.1";
|
2024-11-16 19:00:06 +05:30
|
|
|
sops.secrets = {
|
|
|
|
"wireguard/bifrost/pk" = {
|
|
|
|
mode = "400";
|
|
|
|
owner = config.users.users.root.name;
|
|
|
|
group = config.users.users.root.group;
|
|
|
|
};
|
|
|
|
};
|
2024-11-09 20:27:33 +05:30
|
|
|
networking = {
|
2024-11-16 19:00:06 +05:30
|
|
|
firewall = {
|
|
|
|
allowedUDPPorts = [ 51821 ];
|
|
|
|
trustedInterfaces = [ "Homelab" ];
|
|
|
|
};
|
|
|
|
wg-quick = {
|
|
|
|
interfaces = {
|
|
|
|
Homelab = {
|
|
|
|
listenPort = 51821;
|
|
|
|
privateKeyFile = config.sops.secrets."wireguard/bifrost/pk".path;
|
|
|
|
address = [
|
|
|
|
"10.10.10.1/24"
|
|
|
|
];
|
|
|
|
dns = [ "10.10.10.11" "10.10.10.12" ];
|
|
|
|
peers = with wireguard-peers; [
|
|
|
|
(rico0 // { endpoint = null; })
|
|
|
|
(rico1 // { endpoint = null; })
|
|
|
|
(rico2 // { endpoint = null; })
|
|
|
|
(wynne // { endpoint = null; })
|
|
|
|
(layne // { endpoint = null; })
|
|
|
|
skipper
|
|
|
|
kowalski
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-11-09 20:27:33 +05:30
|
|
|
};
|
|
|
|
}
|