modules: services: paperless: fix DB dependency

This commit is contained in:
Bruno BELANYI 2022-07-28 17:53:55 +02:00
parent 20aebccb92
commit 224e8f8548

View file

@ -83,16 +83,28 @@ in
}; };
systemd.services = { systemd.services = {
paperless-scheduler.serviceConfig = { paperless-scheduler = {
EnvironmentFile = cfg.secretKeyFile; after = [ "postgresql.service" ];
serviceConfig = {
EnvironmentFile = cfg.secretKeyFile;
};
}; };
paperless-consumer.serviceConfig = { paperless-consumer = {
EnvironmentFile = cfg.secretKeyFile; after = [ "postgresql.service" ];
serviceConfig = {
EnvironmentFile = cfg.secretKeyFile;
};
}; };
paperless-web.serviceConfig = { paperless-web = {
EnvironmentFile = cfg.secretKeyFile; after = [ "postgresql.service" ];
serviceConfig = {
EnvironmentFile = cfg.secretKeyFile;
};
}; };
}; };
@ -111,12 +123,6 @@ in
# Set-up media group # Set-up media group
users.groups.media = { }; users.groups.media = { };
systemd.services.paperless-server = {
# Make sure the DB is available
after = [ "postgresql.service" ];
};
users.users.${config.services.paperless.user} = { users.users.${config.services.paperless.user} = {
extraGroups = [ "media" ]; extraGroups = [ "media" ];
}; };