modules: services: paperless: fix DB dependency
This commit is contained in:
parent
cde010a5f2
commit
914b064f72
|
@ -83,19 +83,31 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
paperless-scheduler.serviceConfig = {
|
paperless-scheduler = {
|
||||||
|
after = [ "postgresql.service" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
EnvironmentFile = cfg.secretKeyFile;
|
EnvironmentFile = cfg.secretKeyFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
paperless-consumer.serviceConfig = {
|
|
||||||
EnvironmentFile = cfg.secretKeyFile;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
paperless-web.serviceConfig = {
|
paperless-consumer = {
|
||||||
|
after = [ "postgresql.service" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
EnvironmentFile = cfg.secretKeyFile;
|
EnvironmentFile = cfg.secretKeyFile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
paperless-web = {
|
||||||
|
after = [ "postgresql.service" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
EnvironmentFile = cfg.secretKeyFile;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Set-up database
|
# Set-up database
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -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" ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue