Paper : Fix systemd startup.
This commit is contained in:
parent
9d904bf7b7
commit
5c24476609
|
@ -48,7 +48,7 @@ in {
|
||||||
address = "0.0.0.0";
|
address = "0.0.0.0";
|
||||||
port = cfg.port;
|
port = cfg.port;
|
||||||
# ISSUE: https://github.com/NixOS/nixpkgs/issues/322596
|
# ISSUE: https://github.com/NixOS/nixpkgs/issues/322596
|
||||||
package = pkgsStable.paperless-ngx;
|
# package = pkgsStable.paperless-ngx;
|
||||||
passwordFile = pkgs.writeText "PaperlessPassword" "root";
|
passwordFile = pkgs.writeText "PaperlessPassword" "root";
|
||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_URL = "https://${cfg.domain}";
|
PAPERLESS_URL = "https://${cfg.domain}";
|
||||||
|
@ -65,11 +65,30 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# HACK: This is required for TCP postgres connection.
|
# HACK: This is required for TCP postgres connection.
|
||||||
systemd.services.paperless-scheduler.serviceConfig = {
|
systemd = {
|
||||||
PrivateNetwork = lib.mkForce false;
|
services = {
|
||||||
};
|
paperless-scheduler = {
|
||||||
systemd.services.paperless-consumer.serviceConfig = {
|
serviceConfig.PrivateNetwork = lib.mkForce false;
|
||||||
PrivateNetwork = lib.mkForce false;
|
wantedBy = lib.mkForce [];
|
||||||
|
};
|
||||||
|
paperless-consumer = {
|
||||||
|
serviceConfig.PrivateNetwork = lib.mkForce false;
|
||||||
|
wantedBy = lib.mkForce [];
|
||||||
|
};
|
||||||
|
paperless-web = {
|
||||||
|
wantedBy = lib.mkForce [];
|
||||||
|
};
|
||||||
|
paperless-task-queue = {
|
||||||
|
wantedBy = lib.mkForce [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers.fixsystemd = {
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = 5;
|
||||||
|
Unit = "paperless-web.service";
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,10 +46,13 @@ in {
|
||||||
# This is the network for all the containers.
|
# This is the network for all the containers.
|
||||||
# They are not available to the external interface by default,
|
# They are not available to the external interface by default,
|
||||||
# instead they all expose specific ports in their configuration.
|
# instead they all expose specific ports in their configuration.
|
||||||
networking.nat = {
|
networking = {
|
||||||
enable = true;
|
nat = {
|
||||||
internalInterfaces = [ "ve-+" ];
|
enable = true;
|
||||||
externalInterface = config.container.interface;
|
internalInterfaces = [ "ve-+" ];
|
||||||
|
externalInterface = config.container.interface;
|
||||||
|
};
|
||||||
|
networkmanager.unmanaged = [ "interface-name:ve-*" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue