From 410d181739183d8dea01bfd7c8299969663aaf77 Mon Sep 17 00:00:00 2001 From: Felix Tenley Date: Sun, 28 Mar 2021 23:50:18 +0200 Subject: [PATCH] nixos/etebase-server: add missing static directory setup --- nixos/modules/services/misc/etebase-server.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/etebase-server.nix b/nixos/modules/services/misc/etebase-server.nix index 35da50518661..31e0952b5b98 100644 --- a/nixos/modules/services/misc/etebase-server.nix +++ b/nixos/modules/services/misc/etebase-server.nix @@ -94,6 +94,12 @@ in used as django's SECRET_KEY. ''; }; + static_root = mkOption { + type = types.str; + default = "${cfg.dataDir}/static"; + defaultText = "\${config.services.etebase-server.dataDir}/static"; + description = "The directory for static files."; + }; media_root = mkOption { type = types.str; default = "${cfg.dataDir}/media"; @@ -180,13 +186,14 @@ in }; environment = { PYTHONPATH = "${pythonEnv}/${pkgs.python3.sitePackages}"; - ETEBASE_EASY_CONFIG_PATH = "${configIni}"; + ETEBASE_EASY_CONFIG_PATH = configIni; }; preStart = '' # Auto-migrate on first run or if the package has changed versionFile="${cfg.dataDir}/src-version" if [[ $(cat "$versionFile" 2>/dev/null) != ${pkgs.etebase-server} ]]; then ${pythonEnv}/bin/etebase-server migrate + ${pythonEnv}/bin/etebase-server collectstatic echo ${pkgs.etebase-server} > "$versionFile" fi '';