mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 22:33:46 +03:00
joinmarket: run with group 'bitcoin'
Don't copy bitcoin-rpcpassword-privileged as root, instead run service with group "bitcoin". Same effect, less complexity. Note, PoLP still obeyed for joinmarket-ob-watcher.
This commit is contained in:
parent
ed480a35af
commit
6258d64cb6
@ -232,7 +232,7 @@ in {
|
||||
requires = [ "bitcoind.service" ];
|
||||
after = [ "bitcoind.service" ];
|
||||
serviceConfig = nbLib.defaultHardening // {
|
||||
ExecStartPre = nbLib.privileged "joinmarket-create-config" ''
|
||||
ExecStartPre = nbLib.script "joinmarket-create-config" ''
|
||||
install -o '${cfg.user}' -g '${cfg.group}' -m 640 ${configFile} ${cfg.dataDir}/joinmarket.cfg
|
||||
sed -i \
|
||||
"s|@@RPC_PASSWORD@@|rpc_password = $(cat ${secretsDir}/bitcoin-rpcpassword-privileged)|" \
|
||||
@ -270,7 +270,7 @@ in {
|
||||
group = cfg.group;
|
||||
home = cfg.dataDir;
|
||||
# Allow access to the tor control socket, needed for payjoin onion service creation
|
||||
extraGroups = [ "tor" ];
|
||||
extraGroups = [ "tor" "bitcoin" ];
|
||||
};
|
||||
users.groups.${cfg.group} = {};
|
||||
nix-bitcoin.operator = {
|
||||
|
Loading…
Reference in New Issue
Block a user