diff options
Diffstat (limited to 'systems')
| -rw-r--r-- | systems/atlas/nginx.nix | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/systems/atlas/nginx.nix b/systems/atlas/nginx.nix index 29c76e8..001c4d5 100644 --- a/systems/atlas/nginx.nix +++ b/systems/atlas/nginx.nix @@ -1,21 +1,12 @@ { config, - lib, + inputs, ... }: let - mkProxy = endpoint: port: { - "${endpoint}" = { - proxyPass = "http://localhost:${toString port}"; - proxyWebsockets = true; - }; - }; - - toVHosts = lib.mapAttrs' ( - name: value: lib.nameValuePair "${name}.${config.networking.domain}" value - ); + inherit (inputs.self.lib.nginx) mkProxy toVHosts; in { services.nginx = { - virtualHosts = toVHosts { + virtualHosts = toVHosts config.networking.domain { miniflux = { locations = mkProxy "/" "7000"; }; |
