Merge: [Backport release-25.05] nixos/nextcloud: add assertion explaining to set dbtype (#422645)

This commit is contained in:
Maximilian Bosch
2025-07-08 16:37:08 +02:00
committed by GitHub

View File

@@ -584,11 +584,14 @@ in
config = {
dbtype = mkOption {
type = types.enum [
"sqlite"
"pgsql"
"mysql"
];
type = types.nullOr (
types.enum [
"sqlite"
"pgsql"
"mysql"
]
);
default = null;
description = "Database type.";
};
dbname = mkOption {
@@ -1093,6 +1096,17 @@ in
instead of password.
'';
}
{
assertion = cfg.config.dbtype != null;
message = ''
`services.nextcloud.config.dbtype` must be set explicitly (pgsql, mysql, or sqlite)
Before 25.05, it used to default to sqlite but that is not recommended by upstream.
Either set it to sqlite as it used to be, or convert to another type as described
in the official db conversion page:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html
'';
}
];
}