documize: introduce state directory
This commit is contained in:
parent
922de4f4b5
commit
93fa16f939
1 changed files with 11 additions and 0 deletions
|
@ -14,6 +14,15 @@ in {
|
||||||
options.services.documize = {
|
options.services.documize = {
|
||||||
enable = mkEnableOption "Documize Wiki";
|
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 {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.documize-community;
|
default = pkgs.documize-community;
|
||||||
|
@ -132,6 +141,8 @@ in {
|
||||||
];
|
];
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
DynamicUser = "yes";
|
DynamicUser = "yes";
|
||||||
|
StateDirectory = cfg.stateDirectoryName;
|
||||||
|
WorkingDirectory = "/var/lib/${cfg.stateDirectoryName}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue