From fb87cb5dbd31d494b0364922b354f5ec7bba6907 Mon Sep 17 00:00:00 2001 From: Jaculabilis Date: Sun, 27 Nov 2022 00:26:18 +0000 Subject: [PATCH] Add nebula and remove tinc --- configuration.nix | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/configuration.nix b/configuration.nix index 3b9f270..020d566 100644 --- a/configuration.nix +++ b/configuration.nix @@ -155,13 +155,32 @@ }; };*/ - /*services.tinc.networks = { - beatific = { - name = "catacomb"; - listenAddress = "0.0.0.0"; - chroot = false; + services.nebula.networks.beatific = { + enable = true; + + # Network certificate and host credentials + ca = "/etc/nebula/beatific/beatific.crt"; + cert = "/etc/nebula/beatific/catacomb.crt"; + key = "/etc/nebula/beatific/catacomb.key"; + + listen.port = 4242; + + # Connect to the lighthouse at empyrean + # Note that this is a VPN address, not a public address + lighthouses = [ "10.22.20.1" ]; + + # Map the lighthouse address to its public address + staticHostMap = { "10.22.20.1" = [ "vpn.alogoulogoi.com:4242" ]; }; + + # Don't filter anything at the VPN level + firewall.outbound = [ { port = "any"; proto = "any"; host = "any"; } ]; + firewall.inbound = [ { port = "any"; proto = "any"; host = "any"; } ]; + + settings = { + # Enable UDP holepunching both ways, which allows nodes to establish more direct connections with each other + punchy = { punch = true; response = true; }; }; - };*/ + }; services.zfs = { autoScrub = {