diff --git a/flux/olympus/apps/flux-system/kustomization.yaml b/flux/olympus/apps/flux-system/kustomization.yaml new file mode 100644 index 0000000..bfccb3d --- /dev/null +++ b/flux/olympus/apps/flux-system/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - weave-gitops-dashboard.yaml diff --git a/flux/olympus/apps/flux-system/weave-gitops-dashboard.yaml b/flux/olympus/apps/flux-system/weave-gitops-dashboard.yaml new file mode 100644 index 0000000..5bf60b6 --- /dev/null +++ b/flux/olympus/apps/flux-system/weave-gitops-dashboard.yaml @@ -0,0 +1,41 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + annotations: + metadata.weave.works/description: This is the source location for the Weave GitOps + Dashboard's helm chart. + labels: + app.kubernetes.io/component: ui + app.kubernetes.io/created-by: weave-gitops-cli + app.kubernetes.io/name: weave-gitops-dashboard + app.kubernetes.io/part-of: weave-gitops + name: ww-gitops + namespace: flux-system +spec: + interval: 1h0m0s + type: oci + url: oci://ghcr.io/weaveworks/charts +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + annotations: + metadata.weave.works/description: This is the Weave GitOps Dashboard. It provides + a simple way to get insights into your GitOps workloads. + name: ww-gitops + namespace: flux-system +spec: + chart: + spec: + chart: weave-gitops + sourceRef: + kind: HelmRepository + name: ww-gitops + interval: 1h0m0s + values: + adminUser: + create: true + passwordHash: $2a$10$uIY/YYe.CcRerpVvfk04muX86hLfXRH.K6jATZaVPqp.bnUIu/bsC + username: admin + diff --git a/flux/olympus/apps/kustomization.yaml b/flux/olympus/apps/kustomization.yaml index 0dd5fc5..396b9e1 100644 --- a/flux/olympus/apps/kustomization.yaml +++ b/flux/olympus/apps/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - flux-system - services - websites diff --git a/nixos/common/modules/nginx.nix b/nixos/common/modules/nginx.nix index 4d1ac1f..a6ff28a 100644 --- a/nixos/common/modules/nginx.nix +++ b/nixos/common/modules/nginx.nix @@ -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; - }; } diff --git a/nixos/hosts/olympus/nginx/configuration.nix b/nixos/hosts/olympus/nginx/configuration.nix index 2027eab..8e2a471 100644 --- a/nixos/hosts/olympus/nginx/configuration.nix +++ b/nixos/hosts/olympus/nginx/configuration.nix @@ -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;