See the forum discussion on options for how to approach this here: https://discourse.nixos.org/t/how-to-run-a-service-only-while-a-devshell-is-open/19752?u=mindtree