summaryrefslogtreecommitdiffstats
path: root/tv/3modules/ejabberd/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-10-08 23:15:19 +0200
committertv <tv@krebsco.de>2022-10-08 23:29:23 +0200
commit8d6727eaae2486e19a461b78667baa05191b6b1c (patch)
treef1cdd9c51d0ab959fb1857e4a64bbd09fb4ddac0 /tv/3modules/ejabberd/default.nix
parent1291bb433bb32e4efe320aeb8d422aefbcfbacd1 (diff)
tv ejabberd: make stateDir configurable
Diffstat (limited to 'tv/3modules/ejabberd/default.nix')
-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 {