rippled module: optionSet -> submodule
This commit is contained in:
parent
c1cad56c6e
commit
ef04462ea9
|
@ -154,43 +154,45 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
dbOptions = {
|
dbOptions = {
|
||||||
type = mkOption {
|
options = {
|
||||||
description = "Rippled database type.";
|
type = mkOption {
|
||||||
type = types.enum ["rocksdb" "nudb"];
|
description = "Rippled database type.";
|
||||||
default = "rocksdb";
|
type = types.enum ["rocksdb" "nudb"];
|
||||||
};
|
default = "rocksdb";
|
||||||
|
};
|
||||||
|
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
description = "Location to store the database.";
|
description = "Location to store the database.";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = cfg.databasePath;
|
default = cfg.databasePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
compression = mkOption {
|
compression = mkOption {
|
||||||
description = "Whether to enable snappy compression.";
|
description = "Whether to enable snappy compression.";
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
onlineDelete = mkOption {
|
onlineDelete = mkOption {
|
||||||
description = "Enable automatic purging of older ledger information.";
|
description = "Enable automatic purging of older ledger information.";
|
||||||
type = types.addCheck (types.nullOr types.int) (v: v > 256);
|
type = types.addCheck (types.nullOr types.int) (v: v > 256);
|
||||||
default = cfg.ledgerHistory;
|
default = cfg.ledgerHistory;
|
||||||
};
|
};
|
||||||
|
|
||||||
advisoryDelete = mkOption {
|
advisoryDelete = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
If set, then require administrative RPC call "can_delete"
|
If set, then require administrative RPC call "can_delete"
|
||||||
to enable online deletion of ledger records.
|
to enable online deletion of ledger records.
|
||||||
'';
|
'';
|
||||||
type = types.nullOr types.bool;
|
type = types.nullOr types.bool;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOpts = mkOption {
|
extraOpts = mkOption {
|
||||||
description = "Extra database options.";
|
description = "Extra database options.";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -213,8 +215,7 @@ in
|
||||||
|
|
||||||
ports = mkOption {
|
ports = mkOption {
|
||||||
description = "Ports exposed by rippled";
|
description = "Ports exposed by rippled";
|
||||||
type = types.attrsOf types.optionSet;
|
type = with types; attrsOf (submodule portOptions);
|
||||||
options = [portOptions];
|
|
||||||
default = {
|
default = {
|
||||||
rpc = {
|
rpc = {
|
||||||
port = 5005;
|
port = 5005;
|
||||||
|
@ -238,8 +239,7 @@ in
|
||||||
|
|
||||||
nodeDb = mkOption {
|
nodeDb = mkOption {
|
||||||
description = "Rippled main database options.";
|
description = "Rippled main database options.";
|
||||||
type = types.nullOr types.optionSet;
|
type = with types; nullOr (submodule dbOptions);
|
||||||
options = dbOptions;
|
|
||||||
default = {
|
default = {
|
||||||
type = "rocksdb";
|
type = "rocksdb";
|
||||||
extraOpts = ''
|
extraOpts = ''
|
||||||
|
@ -254,15 +254,13 @@ in
|
||||||
|
|
||||||
tempDb = mkOption {
|
tempDb = mkOption {
|
||||||
description = "Rippled temporary database options.";
|
description = "Rippled temporary database options.";
|
||||||
type = types.nullOr types.optionSet;
|
type = with types; nullOr (submodule dbOptions);
|
||||||
options = dbOptions;
|
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
importDb = mkOption {
|
importDb = mkOption {
|
||||||
description = "Settings for performing a one-time import.";
|
description = "Settings for performing a one-time import.";
|
||||||
type = types.nullOr types.optionSet;
|
type = with types; nullOr (submodule dbOptions);
|
||||||
options = dbOptions;
|
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue