mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
Merge: [Backport release-25.05] nixos/nextcloud: add assertion explaining to set dbtype (#422645)
This commit is contained in:
@@ -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
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user