diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-11-23 14:04:46 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-11-23 14:04:46 +0530 |
| commit | f5f2198da113394bc14e0bfad4e4aaa9ec038033 (patch) | |
| tree | f1ba3ba69e9f156c5b91c0831c71b65b3c3d64a8 /services | |
| parent | f5d51dba7341eadf04749f6a9703f83a5cde4390 (diff) | |
| download | homeserver-nixos-config-f5f2198da113394bc14e0bfad4e4aaa9ec038033.tar.gz homeserver-nixos-config-f5f2198da113394bc14e0bfad4e4aaa9ec038033.zip | |
Paperless
Diffstat (limited to 'services')
| -rw-r--r-- | services/service-router.service.nix | 5 |
1 files changed, 3 insertions, 2 deletions
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; }; |
