fix: fixed domains for searx and paperless

This commit is contained in:
Leyla Becker 2025-10-24 15:01:16 -05:00
parent 0f5507c328
commit c2435883f1
2 changed files with 12 additions and 26 deletions

View file

@ -4,25 +4,18 @@
... ...
}: { }: {
options.services.paperless = { options.services.paperless = {
reverseProxy = {
domain = lib.mkOption {
type = lib.types.str;
description = "domain that paperless will be hosted at";
default = "paperless.arpa";
};
extraDomains = lib.mkOption { extraDomains = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
description = "extra domains that should be configured for paperless"; description = "extra domains that should be configured for paperless";
default = []; default = [];
}; };
}; };
};
config = lib.mkIf (config.services.paperless.enable && config.services.reverseProxy.enable) { config = lib.mkIf (config.services.paperless.enable && config.services.reverseProxy.enable) {
services.reverseProxy.services.paperless = { services.reverseProxy.services.paperless = {
target = "http://${config.services.paperless.address}:${toString config.services.paperless.port}"; target = "http://${config.services.paperless.address}:${toString config.services.paperless.port}";
domain = config.services.paperless.reverseProxy.domain; domain = config.services.paperless.domain;
extraDomains = config.services.paperless.reverseProxy.extraDomains; extraDomains = config.services.paperless.extraDomains;
settings = { settings = {
proxyWebsockets.enable = true; proxyWebsockets.enable = true;

View file

@ -4,25 +4,18 @@
... ...
}: { }: {
options.services.searx = { options.services.searx = {
reverseProxy = {
domain = lib.mkOption {
type = lib.types.str;
description = "domain that searx will be hosted at";
default = "searx.arpa";
};
extraDomains = lib.mkOption { extraDomains = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
description = "extra domains that should be configured for searx"; description = "extra domains that should be configured for searx";
default = []; default = [];
}; };
}; };
};
config = lib.mkIf (config.services.searx.enable && config.services.reverseProxy.enable) { config = lib.mkIf (config.services.searx.enable && config.services.reverseProxy.enable) {
services.reverseProxy.services.searx = { services.reverseProxy.services.searx = {
target = "http://localhost:${toString config.services.searx.settings.server.port}"; target = "http://localhost:${toString config.services.searx.settings.server.port}";
domain = config.services.searx.reverseProxy.domain; domain = config.services.searx.domain;
extraDomains = config.services.searx.reverseProxy.extraDomains; extraDomains = config.services.searx.extraDomains;
settings = { settings = {
forwardHeaders.enable = true; forwardHeaders.enable = true;