nixos-config/nebula.nix

27 lines
691 B
Nix
Raw Normal View History

2022-11-19 06:23:42 +00:00
{ config, pkgs, ... }:
let mastus = "37.252.120.145"; hostname = config.networking.hostName;
in {
services.nebula.networks.gabriel = {
enable = true;
ca = "/etc/nebula/gabriel/ca.crt";
cert = "/etc/nebula/gabriel/${hostname}.crt";
key = "/etc/nebula/gabriel/${hostname}.key";
2022-11-19 07:05:41 +00:00
listen.host = "[::]";
listen.port = 0; # dynamic ip
2022-11-19 06:23:42 +00:00
staticHostMap = {
"192.168.18.36" = [ "${mastus}:4242" ];
};
lighthouses = [
"192.168.18.36"
];
firewall.outbound = [ { port = "any"; proto = "any"; host = "any"; } ];
firewall.inbound = [ { port = "any"; proto = "any"; host = "any"; } ];
};
networking.firewall.allowedUDPPorts = [ 4242 ];
}