double-rainbow: add wopus nebula vpn connection

This commit is contained in:
lelgenio 2025-11-12 15:06:36 -03:00
parent b8e05ad8a2
commit cf9059013c
3 changed files with 58 additions and 2 deletions

View file

@ -20,6 +20,7 @@ in
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
./gitlab-runner.nix
./nebula-vpn.nix
];
my.nix-ld.enable = true;

View file

@ -0,0 +1,51 @@
{ pkgs, config, ... }:
let
s = config.sops.secrets;
secretConfig = {
owner = "nebula-wopus";
group = "nebula-wopus";
restartUnits = [ "nebula@wopus.service" ];
sopsFile = ../../secrets/double-rainbow/default.yaml;
};
in
{
environment.systemPackages = with pkgs; [ nebula ];
services.nebula.networks.wopus = {
enable = true;
isLighthouse = false;
lighthouses = [ "192.168.88.1" ];
settings = {
cipher = "aes";
};
cert = s."nebula-wopus-vpn/double-rainbow-crt".path;
key = s."nebula-wopus-vpn/double-rainbow-key".path;
ca = s."nebula-wopus-vpn/ca-crt".path;
staticHostMap = {
"192.168.88.1" = [
"neubla-vpn.wopus.dev:4242"
];
};
firewall.outbound = [
{
host = "any";
port = "any";
proto = "any";
}
];
firewall.inbound = [
{
host = "any";
port = "any";
proto = "any";
}
];
};
sops.secrets = {
"nebula-wopus-vpn/ca-crt" = secretConfig;
"nebula-wopus-vpn/double-rainbow-crt" = secretConfig;
"nebula-wopus-vpn/double-rainbow-key" = secretConfig;
};
}