fix: fixed domains for searx and paperless
This commit is contained in:
parent
0f5507c328
commit
c2435883f1
2 changed files with 12 additions and 26 deletions
|
|
@ -4,25 +4,18 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.services.paperless = {
|
options.services.paperless = {
|
||||||
reverseProxy = {
|
extraDomains = lib.mkOption {
|
||||||
domain = lib.mkOption {
|
type = lib.types.listOf lib.types.str;
|
||||||
type = lib.types.str;
|
description = "extra domains that should be configured for paperless";
|
||||||
description = "domain that paperless will be hosted at";
|
default = [];
|
||||||
default = "paperless.arpa";
|
|
||||||
};
|
|
||||||
extraDomains = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "extra domains that should be configured for paperless";
|
|
||||||
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;
|
||||||
|
|
|
||||||
|
|
@ -4,25 +4,18 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.services.searx = {
|
options.services.searx = {
|
||||||
reverseProxy = {
|
extraDomains = lib.mkOption {
|
||||||
domain = lib.mkOption {
|
type = lib.types.listOf lib.types.str;
|
||||||
type = lib.types.str;
|
description = "extra domains that should be configured for searx";
|
||||||
description = "domain that searx will be hosted at";
|
default = [];
|
||||||
default = "searx.arpa";
|
|
||||||
};
|
|
||||||
extraDomains = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
description = "extra domains that should be configured for searx";
|
|
||||||
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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue