deploy weave-gitops-dashboard
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
5235617adc
commit
7ba35610a6
5 changed files with 49 additions and 5 deletions
|
@ -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;
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ in {
|
|||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
# Generates vhosts for all hosts that have an `exposes` section
|
||||
services.v.nginx.generateVirtualHosts = true;
|
||||
services.v.nginx.autoExpose = true;
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue