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 = {
|
||||
reverseProxy = {
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "domain that paperless will be hosted at";
|
||||
default = "paperless.arpa";
|
||||
};
|
||||
extraDomains = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "extra domains that should be configured for paperless";
|
||||
default = [];
|
||||
};
|
||||
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) {
|
||||
services.reverseProxy.services.paperless = {
|
||||
target = "http://${config.services.paperless.address}:${toString config.services.paperless.port}";
|
||||
domain = config.services.paperless.reverseProxy.domain;
|
||||
extraDomains = config.services.paperless.reverseProxy.extraDomains;
|
||||
domain = config.services.paperless.domain;
|
||||
extraDomains = config.services.paperless.extraDomains;
|
||||
|
||||
settings = {
|
||||
proxyWebsockets.enable = true;
|
||||
|
|
|
|||
|
|
@ -4,25 +4,18 @@
|
|||
...
|
||||
}: {
|
||||
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 {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "extra domains that should be configured for searx";
|
||||
default = [];
|
||||
};
|
||||
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) {
|
||||
services.reverseProxy.services.searx = {
|
||||
target = "http://localhost:${toString config.services.searx.settings.server.port}";
|
||||
domain = config.services.searx.reverseProxy.domain;
|
||||
extraDomains = config.services.searx.reverseProxy.extraDomains;
|
||||
domain = config.services.searx.domain;
|
||||
extraDomains = config.services.searx.extraDomains;
|
||||
|
||||
settings = {
|
||||
forwardHeaders.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue