From 8d6727eaae2486e19a461b78667baa05191b6b1c Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 8 Oct 2022 23:15:19 +0200 Subject: tv ejabberd: make stateDir configurable --- tv/3modules/ejabberd/default.nix | 9 +++++++-- 1 file 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 { -- cgit v1.2.3