Create networking abstraction on top of nebula

This commit is contained in:
SebastianStork 2026-01-11 19:13:30 +01:00
parent 6804112df6
commit 252abe9443
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
15 changed files with 223 additions and 165 deletions

View file

@ -6,6 +6,7 @@
}:
let
cfg = config.custom.services.caddy;
netCfg = config.custom.networking;
virtualHosts = cfg.virtualHosts |> lib.attrValues |> lib.filter (value: value.enable);
@ -33,7 +34,7 @@ let
in
''
tls ${certDir}/fullchain.pem ${certDir}/key.pem
bind ${config.custom.services.nebula.node.address}
bind ${config.custom.networking.overlay.address}
''
))
(lib.optionalString (port != null) "reverse_proxy localhost:${toString port}")
@ -150,8 +151,8 @@ in
];
systemd.services.caddy = {
requires = [ "nebula@mesh.service" ];
after = [ "nebula@mesh.service" ];
requires = [ netCfg.overlay.systemdUnit ];
after = [ netCfg.overlay.systemdUnit ];
};
})
]