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 {
|
settings = lib.mkOption {
|
||||||
type =
|
type = lib.types.submodule {
|
||||||
lib.types.submodule { freeformType = with lib.types; attrsOf str; };
|
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 = {
|
example = {
|
||||||
FERRETDB_LOG_LEVEL = "warn";
|
FERRETDB_LOG_LEVEL = "warn";
|
||||||
FERRETDB_MODE = "normal";
|
FERRETDB_MODE = "normal";
|
||||||
@ -36,11 +50,7 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable
|
config = lib.mkIf cfg.enable
|
||||||
{
|
{
|
||||||
|
services.ferretdb.settings = { };
|
||||||
services.ferretdb.settings = {
|
|
||||||
FERRETDB_HANDLER = lib.mkDefault "sqlite";
|
|
||||||
FERRETDB_SQLITE_URL = lib.mkDefault "file:/var/lib/ferretdb/";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.ferretdb = {
|
systemd.services.ferretdb = {
|
||||||
description = "FerretDB";
|
description = "FerretDB";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user