services: use doas if enabled
- Remove sudo from recurring-donations path because it's not used by the service - Use doas instead of sudo in secure-node.nix
This commit is contained in:
parent
ce2b445777
commit
2ca92a34a5
7 changed files with 31 additions and 12 deletions
|
|
@ -7,6 +7,7 @@ let
|
|||
nbLib = config.nix-bitcoin.lib;
|
||||
nbPkgs = config.nix-bitcoin.pkgs;
|
||||
secretsDir = config.nix-bitcoin.secretsDir;
|
||||
runAsUser = config.nix-bitcoin.runAsUserCmd;
|
||||
|
||||
inherit (config.services) bitcoind;
|
||||
torAddress = builtins.head (builtins.split ":" config.services.tor.client.socksListenAddress);
|
||||
|
|
@ -84,7 +85,7 @@ let
|
|||
for bin in jm-*; do
|
||||
{
|
||||
echo "#!${pkgs.bash}/bin/bash";
|
||||
echo "cd '${cfg.dataDir}' && ${cfg.cliExec} sudo -u ${cfg.user} $jm/$bin --datadir='${cfg.dataDir}' \"\$@\"";
|
||||
echo "cd '${cfg.dataDir}' && ${cfg.cliExec} ${runAsUser} ${cfg.user} $jm/$bin --datadir='${cfg.dataDir}' \"\$@\"";
|
||||
} > $out/bin/$bin
|
||||
done
|
||||
chmod -R +x $out/bin
|
||||
|
|
@ -211,7 +212,7 @@ in {
|
|||
users.groups.${cfg.group} = {};
|
||||
nix-bitcoin.operator = {
|
||||
groups = [ cfg.group ];
|
||||
sudoUsers = [ cfg.group ];
|
||||
allowRunAsUsers = [ cfg.group ];
|
||||
};
|
||||
|
||||
nix-bitcoin.secrets.jm-wallet-password.user = cfg.user;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue