Paper : Fix systemd startup.

This commit is contained in:
Dmitry Voronin 2024-06-26 20:27:39 +03:00
parent 9d904bf7b7
commit 5c24476609
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 32 additions and 10 deletions

View file

@ -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" ];
};
};
};
};

View file

@ -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-*" ];
};
};
}