secrets: don't stop services when the secrets target stops
With krops or nixops the secrets target is always restarted during the deployment process. This previously caused unnecessary restarts of all nix-bitcoin services.
This commit is contained in:
committed by
Jonas Nick
parent
b701cb5603
commit
b0c223e716
@@ -312,9 +312,14 @@ in {
|
||||
];
|
||||
|
||||
systemd.services.bitcoind = {
|
||||
requires = [ "nix-bitcoin-secrets.target" ];
|
||||
# Use `wants` instead of `requires` so that bitcoind and all dependent services
|
||||
# are not restarted when the secrets target restarts.
|
||||
# The secrets target always restarts when deploying with one of the methods
|
||||
# in ./deployment.
|
||||
wants = [ "nix-bitcoin-secrets.target" ];
|
||||
after = [ "network.target" "nix-bitcoin-secrets.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
preStart = let
|
||||
extraRpcauth = concatMapStrings (name: let
|
||||
user = cfg.rpc.users.${name};
|
||||
|
||||
Reference in New Issue
Block a user