From 06a47388776072307a4cf67b020dfec354df91fa Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Fri, 18 Nov 2022 22:00:23 -0800 Subject: [PATCH] mastus: add nebula --- mastus/configuration.nix | 1 + mastus/nebula.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 mastus/nebula.nix diff --git a/mastus/configuration.nix b/mastus/configuration.nix index be162c6..4b32d7d 100644 --- a/mastus/configuration.nix +++ b/mastus/configuration.nix @@ -17,6 +17,7 @@ ./radicale.nix # ./ttrss.nix ./dns.nix + ./nebula.nix ]; boot.loader.grub.enable = true; diff --git a/mastus/nebula.nix b/mastus/nebula.nix new file mode 100644 index 0000000..77e48b9 --- /dev/null +++ b/mastus/nebula.nix @@ -0,0 +1,22 @@ +{ config, pkgs, ... }: + +let mastus = "37.252.120.145"; +in { + services.nebula.networks.gabriel = { + enable = true; + ca = "/etc/nebula/gabriel/ca.crt"; + cert = "/etc/nebula/gabriel/mastus.crt"; + key = "/etc/nebula/gabriel/mastus.key"; + + isLighthouse = true; + staticHostMap = { + "192.168.18.36" = [ "${mastus}:4242" ]; + }; + + firewall.inbound = [ { port = "any"; proto = "any"; host = "any"; } ]; + + settings.lighthouse.dns = { host = "0.0.0.0"; port = 53; }; + }; + + networking.firewall.allowedUDPPorts = [ 4242 ]; +}