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