From 218d75d57358429d3ecba371c8d5e0f3441d76cb Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Fri, 21 Mar 2025 15:32:59 -0700 Subject: [PATCH] update nixos module Can't believe I forgot to do this... --- nix/modules/default/default.nix | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/nix/modules/default/default.nix b/nix/modules/default/default.nix index 92873a71..37912a83 100644 --- a/nix/modules/default/default.nix +++ b/nix/modules/default/default.nix @@ -44,14 +44,40 @@ in type = types.nonEmptyStr; readOnly = true; description = '' - The path to store persistent data in. + The path to store database files in. Note that this is read-only because this module makes use of systemd's `StateDirectory` option. ''; default = if cfg.settings.conduit_compat - then "/var/lib/matrix-conduit" - else "/var/lib/grapevine"; + then "/var/lib/matrix-conduit/database" + else "/var/lib/grapevine/database"; + }; + media.backend = { + type = lib.mkOption { + type = types.nonEmptyStr; + readOnly = true; + description = '' + The media backend to use. + + Note that this is read-only because `filesystem` is currently + the only valid option. + ''; + default = "filesystem"; + }; + path = lib.mkOption { + type = types.nonEmptyStr; + readOnly = true; + description = '' + The path to store database files in. + + Note that this is read-only because this module makes use of + systemd's `StateDirectory` option. + ''; + default = if cfg.settings.conduit_compat + then "/var/lib/matrix-conduit/media" + else "/var/lib/grapevine/media"; + }; }; listen = lib.mkOption { type = types.listOf format.type;