tv ejabberd: make stateDir configurable

This commit is contained in:
tv 2022-10-08 23:15:19 +02:00
parent 1291bb433b
commit 8d6727eaae
1 changed files with 7 additions and 2 deletions

View File

@ -115,9 +115,14 @@ in {
default = {};
};
stateDir = mkOption {
type = types.absolute-pathname;
type =
types.addCheck
types.absolute-pathname
(path:
hasPrefix "/var/lib/" path &&
types.filename.check (removePrefix "/var/lib/" path)
);
default = "/var/lib/ejabberd";
readOnly = true;
};
};
config = lib.mkIf cfg.enable {