Initial nebula config

This commit is contained in:
Bailey 2024-03-23 21:46:54 -04:00
parent f713e3fac8
commit c1773cd8a1
9 changed files with 48 additions and 1 deletions

View file

@ -8,6 +8,7 @@
{
imports = [
./users.nix
./nebula.nix
];
i18n.defaultLocale = "en_US.UTF-8";
@ -66,7 +67,7 @@
environment.systemPackages = with pkgs; [
nvd nixpkgs-fmt nix-output-monitor
coreutils mime-types file
usbutils pciutils gitFull
usbutils pciutils gitFull git-crypt
];
nix = let

View file

@ -0,0 +1,46 @@
{
config,
lib,
inputs,
...
}:
{
services.nebula.networks.bbs = {
enable = lib.mkDefault true;
ca = "${inputs.self}/secrets/nebula/ca.crt";
cert = "${inputs.self}/secrets/nebula/${config.networking.hostName}.bbs.lan.crt";
key = "${inputs.self}/secrets/nebula/${config.networking.hostName}.bbs.lan.key";
staticHostMap = {
"10.7.0.1" = [ "5.161.60.61:4242" ];
};
lighthouses = [ "10.7.0.1" ];
firewall = {
outbound = [
{
port = "any";
proto = "any";
host = "any";
}
];
inbound = [
{
port = "any";
proto = "icmp";
host = "any";
}
] ++ lib.optional config.services.openssh.enable {
port = 22;
proto = "tcp";
group = "any";
};
};
settings = {
punchy = {
punch = true;
};
};
};
networking.networkmanager.insertNameservers =
lib.optional config.services.nebula.networks.bbs.enable "10.7.0.1";
}

BIN
secrets/nebula/ca.crt Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.