diff --git a/nebula.nix b/nebula.nix new file mode 100644 index 0000000..76cef2b --- /dev/null +++ b/nebula.nix @@ -0,0 +1,23 @@ +{ 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"; + + 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 ]; +} diff --git a/petalius.nix b/petalius.nix index eaf7155..f6b1446 100644 --- a/petalius.nix +++ b/petalius.nix @@ -14,6 +14,7 @@ ./huion.nix ./nvim05.nix ./nm-restart.nix + ./nebula.nix ]; hardware.enableRedistributableFirmware = true;