summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tv/3modules/ejabberd/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix
index 2a87b59c0..ce736f43c 100644
--- a/tv/3modules/ejabberd/default.nix
+++ b/tv/3modules/ejabberd/default.nix
@@ -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 {