nixos/ferretdb: set default value for PostgreSQL URL

provides a nice default if the end user wants to use the PostgreSQL
backend
This commit is contained in:
Minijackson 2024-02-13 10:51:01 +01:00
parent ccd19c4503
commit 3b3764df09
No known key found for this signature in database
GPG Key ID: FEA888C9F5D64F62
2 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,12 @@ in
default = "file:/var/lib/ferretdb/"; default = "file:/var/lib/ferretdb/";
description = "SQLite URI (directory) for 'sqlite' handler"; description = "SQLite URI (directory) for 'sqlite' handler";
}; };
FERRETDB_POSTGRESQL_URL = lib.mkOption {
type = lib.types.str;
default = "postgres://ferretdb@localhost/ferretdb?host=/run/postgresql";
description = "PostgreSQL URL for 'pg' handler";
};
}; };
}; };
example = { example = {

View File

@ -26,7 +26,6 @@ with import ../lib/testing-python.nix { inherit system; };
services.ferretdb = { services.ferretdb = {
enable = true; enable = true;
settings.FERRETDB_HANDLER = "pg"; settings.FERRETDB_HANDLER = "pg";
settings.FERRETDB_POSTGRESQL_URL = "postgres://ferretdb@localhost/ferretdb?host=/run/postgresql";
}; };
systemd.services.ferretdb.serviceConfig = { systemd.services.ferretdb.serviceConfig = {