From f5f2198da113394bc14e0bfad4e4aaa9ec038033 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 23 Nov 2025 14:04:46 +0530 Subject: Paperless --- services/service-router.service.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services') diff --git a/services/service-router.service.nix b/services/service-router.service.nix index e52280f..0431e10 100644 --- a/services/service-router.service.nix +++ b/services/service-router.service.nix @@ -16,6 +16,7 @@ in { protocol = mkOption { type = types.str; default = "http"; }; basePath = mkOption { type = types.str; default = ""; }; extraNginxOptions = mkOption { type = types.attrs; default = {}; }; + configureNginx = mkOption { type = types.bool; default = true; }; }; }); default = {}; }; @@ -26,7 +27,7 @@ in { enable = true; recommendedOptimisation = true; virtualHosts = lib.mapAttrs (_: val: - let + lib.mkIf val.configureNginx (let opts = if hasAttr "extraNginxOptions" val then val.extraNginxOptions else {}; in { locations."/" = { @@ -34,7 +35,7 @@ in { "${val.protocol}://${val.host}:${toString val.port}${val.basePath}"; proxyWebsockets = true; } // opts; - } + }) ) cfg.routes; }; -- cgit v1.3.1