deploy weave-gitops-dashboard

This commit is contained in:
Vivian 2023-05-11 13:27:59 +02:00
parent dfaf6b1fde
commit 31ac2708eb
5 changed files with 49 additions and 5 deletions

View file

@ -2,7 +2,7 @@
with lib;
let cfg = config.services.v.nginx;
in {
options.services.v.nginx.generateVirtualHosts =
options.services.v.nginx.autoExpose =
mkEnableOption "generate vhosts";
config = let
@ -24,9 +24,7 @@ in {
"${domain}" = proxy "http://${ip}:${toString port}";
};
vhosts = foldr (el: acc: acc // mkVhost el) { } (concatMap exposes hosts');
in mkIf cfg.generateVirtualHosts {
in mkIf cfg.autoExpose {
services.nginx.virtualHosts = vhosts;
};
}