summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-08-03 12:13:14 -0400
committerseth <[email protected]>2023-08-03 12:13:14 -0400
commitf7956805347563d2958de5cda0a617dfaca640b5 (patch)
tree50d49ea801ae40722026123d60d6091f8de9a1df
parent527cea875ab37a7469975cd09906f424b988175c (diff)
hosts/atlas+p-body: add workaround for nixos/nixpkgs#210807
-rw-r--r--hosts/atlas/nginx.nix26
-rw-r--r--hosts/p-body/nginx.nix28
2 files changed, 35 insertions, 19 deletions
diff --git a/hosts/atlas/nginx.nix b/hosts/atlas/nginx.nix
index 1e2a349..2356e1d 100644
--- a/hosts/atlas/nginx.nix
+++ b/hosts/atlas/nginx.nix
@@ -20,20 +20,32 @@
recommendedTlsSettings = true;
virtualHosts = let
+ inherit (config.networking) domain;
+
mkProxy = endpoint: port: {
"${endpoint}" = {
proxyPass = "http://localhost:${port}";
proxyWebsockets = true;
};
};
- inherit (config.networking) domain;
- in {
- "miniflux.${domain}" = {
- enableACME = true;
- addSSL = true;
- locations = mkProxy "/" "7000";
+ mkVHosts = builtins.mapAttrs (_: v:
+ v
+ // {
+ enableACME = true;
+ # workaround for https://github.com/NixOS/nixpkgs/issues/210807
+ acmeRoot = null;
+ forceSSL = true;
+ });
+ in
+ mkVHosts {
+ "miniflux.${domain}" = {
+ locations = mkProxy "/" "7000";
+ };
+
+ "msix.${domain}" = {
+ root = "/var/www/msix";
+ };
};
- };
};
}
diff --git a/hosts/p-body/nginx.nix b/hosts/p-body/nginx.nix
index b2dae30..1d491d2 100644
--- a/hosts/p-body/nginx.nix
+++ b/hosts/p-body/nginx.nix
@@ -21,20 +21,24 @@ in {
proxyWebsockets = true;
};
};
- in {
- "api.${domain}" = {
- enableACME = true;
- addSSL = true;
- locations = mkProxy "/" "8080";
- };
-
- "grafana.${domain}" = {
- enableACME = true;
- addSSL = true;
+ mkVHosts = builtins.mapAttrs (_: v:
+ v
+ // {
+ enableACME = true;
+ # workaround for https://github.com/NixOS/nixpkgs/issues/210807
+ acmeRoot = null;
+ forceSSL = true;
+ });
+ in
+ mkVHosts {
+ "api.${domain}" = {
+ locations = mkProxy "/" "8080";
+ };
- locations = mkProxy "/" "4000";
+ "grafana.${domain}" = {
+ locations = mkProxy "/" "4000";
+ };
};
- };
};
}