port to string
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.servers.paperless;
|
cfg = config.my.servers.paperless;
|
||||||
|
port = builtins.toString config.services.paperless.port;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.servers.paperless.enable = lib.mkEnableOption "Paperless-ngx document management system";
|
options.my.servers.paperless.enable = lib.mkEnableOption "Paperless-ngx document management system";
|
||||||
config = lib.mkIf (cfg.enable && config.my.servers.postgres.enable) {
|
config = lib.mkIf (cfg.enable && config.my.servers.postgres.enable) {
|
||||||
networking.firewall.allowedTCPPorts = [ config.services.paperless.port ];
|
networking.firewall.allowedTCPPorts = [ port ];
|
||||||
services.paperless = {
|
services.paperless = {
|
||||||
inherit (cfg) enable;
|
inherit (cfg) enable;
|
||||||
address = config.my.ips.server;
|
address = config.my.ips.server;
|
||||||
@@ -13,7 +14,7 @@ in
|
|||||||
consumptionDir = "/srv/pool/scans/";
|
consumptionDir = "/srv/pool/scans/";
|
||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http";
|
PAPERLESS_ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http";
|
||||||
PAPERLESS_URL = "http://${config.my.ips.server}:${config.services.paperless.port}";
|
PAPERLESS_URL = "http://${config.my.ips.server}:${port}";
|
||||||
PAPERLESS_DBENGINE = "postgress";
|
PAPERLESS_DBENGINE = "postgress";
|
||||||
PAPERLESS_DBNAME = "paperless";
|
PAPERLESS_DBNAME = "paperless";
|
||||||
PAPERLESS_DBHOST = config.my.postgresSocket;
|
PAPERLESS_DBHOST = config.my.postgresSocket;
|
||||||
|
|||||||
Reference in New Issue
Block a user