nixos/ferretdb: move default settings to options
so that they are documented in the options list
This commit is contained in:
parent
e8711e1591
commit
ccd19c4503
@ -19,8 +19,22 @@ in
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type =
|
||||
lib.types.submodule { freeformType = with lib.types; attrsOf str; };
|
||||
type = lib.types.submodule {
|
||||
freeformType = with lib.types; attrsOf str;
|
||||
options = {
|
||||
FERRETDB_HANDLER = lib.mkOption {
|
||||
type = lib.types.enum [ "sqlite" "pg" ];
|
||||
default = "sqlite";
|
||||
description = "Backend handler";
|
||||
};
|
||||
|
||||
FERRETDB_SQLITE_URL = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "file:/var/lib/ferretdb/";
|
||||
description = "SQLite URI (directory) for 'sqlite' handler";
|
||||
};
|
||||
};
|
||||
};
|
||||
example = {
|
||||
FERRETDB_LOG_LEVEL = "warn";
|
||||
FERRETDB_MODE = "normal";
|
||||
@ -36,11 +50,7 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable
|
||||
{
|
||||
|
||||
services.ferretdb.settings = {
|
||||
FERRETDB_HANDLER = lib.mkDefault "sqlite";
|
||||
FERRETDB_SQLITE_URL = lib.mkDefault "file:/var/lib/ferretdb/";
|
||||
};
|
||||
services.ferretdb.settings = { };
|
||||
|
||||
systemd.services.ferretdb = {
|
||||
description = "FerretDB";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user