liquid: remove unused features
- `hexStr` is unused - Simplify ExecStart options - Quote `dataDir` - Remove unneeded `pidFile` setting
This commit is contained in:
parent
82d910e937
commit
09169365d8
@ -143,7 +143,6 @@ let
|
|||||||
|
|
||||||
bitcoind = config.services.bitcoind;
|
bitcoind = config.services.bitcoind;
|
||||||
|
|
||||||
pidFile = "${cfg.dataDir}/liquidd.pid";
|
|
||||||
configFile = pkgs.writeText "elements.conf" ''
|
configFile = pkgs.writeText "elements.conf" ''
|
||||||
chain=${bitcoind.makeNetworkName "liquidv1" ''
|
chain=${bitcoind.makeNetworkName "liquidv1" ''
|
||||||
regtest
|
regtest
|
||||||
@ -176,11 +175,6 @@ let
|
|||||||
# Extra config options (from liquidd nixos service)
|
# Extra config options (from liquidd nixos service)
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
cmdlineOptions = concatMapStringsSep " " (arg: "'${arg}'") [
|
|
||||||
"-datadir=${cfg.dataDir}"
|
|
||||||
"-pid=${pidFile}"
|
|
||||||
];
|
|
||||||
hexStr = types.strMatching "[0-9a-f]+";
|
|
||||||
rpcUserOpts = { name, ... }: {
|
rpcUserOpts = { name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
@ -234,8 +228,7 @@ in {
|
|||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
ExecStart = "${nbPkgs.elementsd}/bin/elementsd ${cmdlineOptions}";
|
ExecStart = "${nbPkgs.elementsd}/bin/elementsd -datadir='${cfg.dataDir}'";
|
||||||
PIDFile = pidFile;
|
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
ReadWritePaths = cfg.dataDir;
|
ReadWritePaths = cfg.dataDir;
|
||||||
} // nbLib.allowedIPAddresses cfg.enforceTor;
|
} // nbLib.allowedIPAddresses cfg.enforceTor;
|
||||||
|
Loading…
Reference in New Issue
Block a user