From 93fa16f93980d38bdd1b3f4e415abad2c1fd3147 Mon Sep 17 00:00:00 2001 From: elseym Date: Sat, 5 Oct 2019 00:40:44 +0200 Subject: [PATCH] documize: introduce state directory --- nixos/modules/services/web-apps/documize.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/modules/services/web-apps/documize.nix b/nixos/modules/services/web-apps/documize.nix index 37359869cb64..1b90299aa23c 100644 --- a/nixos/modules/services/web-apps/documize.nix +++ b/nixos/modules/services/web-apps/documize.nix @@ -14,6 +14,15 @@ in { options.services.documize = { enable = mkEnableOption "Documize Wiki"; + stateDirectoryName = mkOption { + type = types.str; + default = "documize"; + description = '' + The name of the directory below /var/lib/private + where documize runs in and stores, for example, backups. + ''; + }; + package = mkOption { type = types.package; default = pkgs.documize-community; @@ -132,6 +141,8 @@ in { ]; Restart = "always"; DynamicUser = "yes"; + StateDirectory = cfg.stateDirectoryName; + WorkingDirectory = "/var/lib/${cfg.stateDirectoryName}"; }; }; };