diff --git a/modules/onion-chef.nix b/modules/onion-chef.nix index 0ec05c0..df9c36f 100644 --- a/modules/onion-chef.nix +++ b/modules/onion-chef.nix @@ -70,14 +70,13 @@ in { config = mkIf cfg.enable { systemd.services.onion-chef = { description = "Run onion-chef"; - wantedBy = [ "multi-user.target" ]; - requires = [ "tor.service" ]; - partOf = [ "tor.service" ]; + wantedBy = [ "tor.service" ]; + bindsTo = [ "tor.service" ]; after = [ "tor.service" ]; serviceConfig = { ExecStart = "${pkgs.bash}/bin/bash ${onion-chef-script}"; - User = "root"; Type = "oneshot"; + RemainAfterExit = true; } // nix-bitcoin-services.defaultHardening; }; };