petalius: add to nebula

This commit is contained in:
Gabriel Ebner 2022-11-18 22:23:42 -08:00
parent 06a4738877
commit 429a7a1e55
2 changed files with 24 additions and 0 deletions

23
nebula.nix Normal file
View File

@ -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 ];
}

View File

@ -14,6 +14,7 @@
./huion.nix
./nvim05.nix
./nm-restart.nix
./nebula.nix
];
hardware.enableRedistributableFirmware = true;