summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorstuebinm2024-02-15 19:43:42 +0100
committerstuebinm2024-02-15 19:43:42 +0100
commit5788f8499e5e7089e1c64e397c2308f26874c3a5 (patch)
tree32bf556051725f31ed08a9e10dbef2fba0b4f556 /modules
parented53fa3cf4b9c00064c89e75df68a2fe1e965275 (diff)
modules/bookwyrm: manage.py wrapper needs env file
otherwise it just fails to start with an error
Diffstat (limited to 'modules')
-rw-r--r--modules/bookwyrm.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/bookwyrm.nix b/modules/bookwyrm.nix
index 9f48ab3..b57636d 100644
--- a/modules/bookwyrm.nix
+++ b/modules/bookwyrm.nix
@@ -2,6 +2,7 @@
let
cfg = config.services.bookwyrm;
+ manage-wrapper = cfg.package.manage cfg.environmentFile;
in
{
options.services.bookwyrm = with lib; {
@@ -125,9 +126,9 @@ in
environment.PYTHONPATH = cfg.package.pythonPath;
preStart = ''
- ${lib.getExe cfg.package.manage} migrate
+ ${lib.getExe manage-wrapper} migrate
# will fail after the first time
- ${lib.getExe cfg.package.manage} initdb || true
+ ${lib.getExe manage-wrapper} initdb || true
'';
};
@@ -178,7 +179,7 @@ in
users.groups.bookwyrm = {};
environment.systemPackages = mkIf cfg.installWrapper [
- cfg.package.manage
+ manage-wrapper
];
warnings = mkIf (cfg.settings ? "SECRET_KEY") [ ''