configuration.nix/hosts/skipper/network/wireguard.nix

34 lines
768 B
Nix
Raw Normal View History

2024-11-16 19:00:06 +05:30
{ config, ... }:
let
wireguard-peers = import ../../shared/wireguard-peers.nix;
in
{
2024-07-02 23:20:11 +05:30
sops.secrets = {
"wireguard/skipper/pk" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
};
2024-06-30 18:45:27 +05:30
};
2024-11-16 19:00:06 +05:30
networking = {
firewall = {
trustedInterfaces = [ "Homelab" ];
};
wg-quick = {
interfaces = {
Homelab = {
listenPort = 51822;
privateKeyFile = config.sops.secrets."wireguard/skipper/pk".path;
address = [
"10.10.10.2/24"
];
dns = [ "10.10.10.11" "10.10.10.12" ];
peers = with wireguard-peers; [
(bifrost // { allowedIPs = [ "10.10.10.0/24" ]; })
];
};
};
};
2024-03-31 22:28:56 +05:30
};
}