From 09169365d8dfb7ed5ec4c2b197b9fd53bff21f19 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 1 Oct 2021 11:51:59 +0200 Subject: [PATCH] liquid: remove unused features - `hexStr` is unused - Simplify ExecStart options - Quote `dataDir` - Remove unneeded `pidFile` setting --- modules/liquid.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/liquid.nix b/modules/liquid.nix index aaf7059..a0714e9 100644 --- a/modules/liquid.nix +++ b/modules/liquid.nix @@ -143,7 +143,6 @@ let bitcoind = config.services.bitcoind; - pidFile = "${cfg.dataDir}/liquidd.pid"; configFile = pkgs.writeText "elements.conf" '' chain=${bitcoind.makeNetworkName "liquidv1" '' regtest @@ -176,11 +175,6 @@ let # Extra config options (from liquidd nixos service) ${cfg.extraConfig} ''; - cmdlineOptions = concatMapStringsSep " " (arg: "'${arg}'") [ - "-datadir=${cfg.dataDir}" - "-pid=${pidFile}" - ]; - hexStr = types.strMatching "[0-9a-f]+"; rpcUserOpts = { name, ... }: { options = { name = mkOption { @@ -234,8 +228,7 @@ in { Type = "simple"; User = cfg.user; Group = cfg.group; - ExecStart = "${nbPkgs.elementsd}/bin/elementsd ${cmdlineOptions}"; - PIDFile = pidFile; + ExecStart = "${nbPkgs.elementsd}/bin/elementsd -datadir='${cfg.dataDir}'"; Restart = "on-failure"; ReadWritePaths = cfg.dataDir; } // nbLib.allowedIPAddresses cfg.enforceTor;