Merge pull request #70422 from elseym/documize-writable-home

documize: introduce state directory
This commit is contained in:
Maximilian Bosch 2019-10-05 13:20:58 +02:00 committed by GitHub
commit d72f4e2ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 <filename>/var/lib/private</filename>
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}";
};
};
};