summaryrefslogtreecommitdiff
path: root/hosts/atlas/nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/atlas/nginx.nix')
-rw-r--r--hosts/atlas/nginx.nix34
1 files changed, 8 insertions, 26 deletions
diff --git a/hosts/atlas/nginx.nix b/hosts/atlas/nginx.nix
index fa06dc3..cdf483d 100644
--- a/hosts/atlas/nginx.nix
+++ b/hosts/atlas/nginx.nix
@@ -1,9 +1,10 @@
{
config,
- lib,
+ self,
...
}: let
inherit (config.networking) domain;
+ inherit (self.lib.utils.nginx) mkVHosts mkProxy;
in {
server = {
acme.enable = true;
@@ -18,33 +19,14 @@ in {
recommendedProxySettings = true;
recommendedTlsSettings = true;
- virtualHosts = let
- mkProxy = endpoint: port: {
- "${endpoint}" = {
- proxyPass = "http://localhost:${port}";
- proxyWebsockets = true;
- };
+ virtualHosts = mkVHosts {
+ "miniflux.${domain}" = {
+ locations = mkProxy "/" "7000";
};
- mkVHosts = let
- commonSettings = {
- enableACME = true;
- # workaround for https://github.com/NixOS/nixpkgs/issues/210807
- acmeRoot = null;
-
- addSSL = true;
- };
- in
- builtins.mapAttrs (_: lib.recursiveUpdate commonSettings);
- in
- mkVHosts {
- "miniflux.${domain}" = {
- locations = mkProxy "/" "7000";
- };
-
- "msix.${domain}" = {
- root = "/var/www/msix";
- };
+ "msix.${domain}" = {
+ root = "/var/www/msix";
};
+ };
};
}