simplify ExecStart

This commit is contained in:
Erik Arvstedt 2020-04-07 23:04:58 +02:00
parent 64fc63cc40
commit 47fd6cd0f3
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -41,9 +41,6 @@ let
# Extra config options (from bitcoind nixos service) # Extra config options (from bitcoind nixos service)
${cfg.extraConfig} ${cfg.extraConfig}
''; '';
cmdlineOptions = concatMapStringsSep " " (arg: "'${arg}'") [
"-datadir=${cfg.dataDir}"
];
hexStr = types.strMatching "[0-9a-f]+"; hexStr = types.strMatching "[0-9a-f]+";
rpcUserOpts = { name, ... }: { rpcUserOpts = { name, ... }: {
options = { options = {
@ -282,7 +279,7 @@ in {
serviceConfig = { serviceConfig = {
User = "${cfg.user}"; User = "${cfg.user}";
Group = "${cfg.group}"; Group = "${cfg.group}";
ExecStart = "${cfg.package}/bin/bitcoind ${cmdlineOptions}"; ExecStart = "${cfg.package}/bin/bitcoind -datadir='${cfg.dataDir}'";
Restart = "on-failure"; Restart = "on-failure";
# Hardening measures # Hardening measures