Merge pull request #7550 from offlinehacker/nixos/rippled/changes
nixos/rippled: new options, fixes
This commit is contained in:
commit
ffea231652
|
@ -12,7 +12,7 @@ let
|
||||||
path=${db.path}
|
path=${db.path}
|
||||||
${optionalString (db.compression != null) ("compression=${b2i db.compression}") }
|
${optionalString (db.compression != null) ("compression=${b2i db.compression}") }
|
||||||
${optionalString (db.onlineDelete != null) ("online_delete=${toString db.onlineDelete}")}
|
${optionalString (db.onlineDelete != null) ("online_delete=${toString db.onlineDelete}")}
|
||||||
${optionalString (db.advisoryDelete != null) ("advisory_delete=${toString db.advisoryDelete}")}
|
${optionalString (db.advisoryDelete != null) ("advisory_delete=${b2i db.advisoryDelete}")}
|
||||||
${db.extraOpts}
|
${db.extraOpts}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -71,6 +71,13 @@ let
|
||||||
[sntp_servers]
|
[sntp_servers]
|
||||||
${concatStringsSep "\n" cfg.sntpServers}
|
${concatStringsSep "\n" cfg.sntpServers}
|
||||||
|
|
||||||
|
${optionalString cfg.statsd.enable ''
|
||||||
|
[insight]
|
||||||
|
server=statsd
|
||||||
|
address=${cfg.statsd.address}
|
||||||
|
prefix=${cfg.statsd.prefix}
|
||||||
|
''}
|
||||||
|
|
||||||
[rpc_startup]
|
[rpc_startup]
|
||||||
{ "command": "log_level", "severity": "${cfg.logLevel}" }
|
{ "command": "log_level", "severity": "${cfg.logLevel}" }
|
||||||
'' + cfg.extraConfig;
|
'' + cfg.extraConfig;
|
||||||
|
@ -142,7 +149,6 @@ let
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr types.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -150,7 +156,7 @@ let
|
||||||
dbOptions = {
|
dbOptions = {
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
description = "Rippled database type.";
|
description = "Rippled database type.";
|
||||||
type = types.enum ["rocksdb" "nudb" "sqlite"];
|
type = types.enum ["rocksdb" "nudb" "sqlite" "hyperleveldb"];
|
||||||
default = "rocksdb";
|
default = "rocksdb";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -317,7 +323,7 @@ in
|
||||||
Path to the ripple database.
|
Path to the ripple database.
|
||||||
'';
|
'';
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "/var/lib/rippled/db";
|
default = "/var/lib/rippled";
|
||||||
};
|
};
|
||||||
|
|
||||||
validationQuorum = mkOption {
|
validationQuorum = mkOption {
|
||||||
|
@ -366,6 +372,22 @@ in
|
||||||
default = "error";
|
default = "error";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
statsd = {
|
||||||
|
enable = mkEnableOption "Whether enable statsd monitoring for rippled";
|
||||||
|
|
||||||
|
address = mkOption {
|
||||||
|
description = "The UDP address and port of the listening StatsD server.";
|
||||||
|
default = "127.0.0.1:8125";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
prefix = mkOption {
|
||||||
|
description = "A string prepended to each collected metric.";
|
||||||
|
default = "";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -400,6 +422,8 @@ in
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/rippled --fg --conf ${cfg.config}";
|
ExecStart = "${cfg.package}/bin/rippled --fg --conf ${cfg.config}";
|
||||||
User = "rippled";
|
User = "rippled";
|
||||||
|
Restart = "on-failure";
|
||||||
|
LimitNOFILE=10000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue