Remove PermissionStartOnly where possible and replace with bitcoinrpc

Remove PermissionsStartOnly for bitcoind and spark-wallet (it was never
needed there)

Give reason for PermissionsStartOnly in lightning-charge

Replace PermissionsStartOnly in clightning, electrs and liquid
This commit is contained in:
nixbitcoin 2020-05-21 18:05:31 +02:00
parent 91b6b2c370
commit adc71b892e
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
7 changed files with 8 additions and 12 deletions

View file

@ -286,9 +286,6 @@ in {
ExecStart = "${cfg.package}/bin/bitcoind -datadir='${cfg.dataDir}'";
Restart = "on-failure";
UMask = mkIf cfg.dataDirReadableByGroup "0027";
# Permission for preStart
PermissionsStartOnly = "true";
} // (if cfg.enforceTor
then nix-bitcoin-services.allowTor
else nix-bitcoin-services.allowAnyIP)
@ -328,9 +325,11 @@ in {
description = "Bitcoin daemon user";
};
users.groups.${cfg.group} = {};
users.groups.bitcoinrpc = {};
nix-bitcoin.secrets.bitcoin-rpcpassword = {
user = "bitcoin";
group = "bitcoinrpc";
};
};
}