From 1529d60a6a0428e87abcf35cca29ee6b03b3f4d8 Mon Sep 17 00:00:00 2001 From: Olivia Lee Date: Sun, 6 Apr 2025 20:03:09 -0700 Subject: [PATCH] set default database backend in nixos module to rocksdb The media backend already has a default value. --- nix/modules/default/default.nix | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/nix/modules/default/default.nix b/nix/modules/default/default.nix index 1bd8f8d6..38468e44 100644 --- a/nix/modules/default/default.nix +++ b/nix/modules/default/default.nix @@ -40,18 +40,27 @@ in ''; default = false; }; - database.path = lib.mkOption { - type = types.nonEmptyStr; - readOnly = true; - description = '' - The path to store database files in. + database = { + backend = lib.mkOption { + type = types.nonEmptyStr; + description = '' + The database backend to use. + ''; + default = "rocksdb"; + }; + 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/database" - else "/var/lib/grapevine/database"; + 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/database" + else "/var/lib/grapevine/database"; + }; }; media.backend = { type = lib.mkOption {