mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Create networking abstraction on top of nebula
This commit is contained in:
parent
6804112df6
commit
252abe9443
15 changed files with 223 additions and 165 deletions
|
|
@ -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 ];
|
||||
};
|
||||
})
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue