cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.61k stars 262 forks source link

Update restart Nix command for macOS to include -k flag #1081

Closed dorranh closed 2 months ago

dorranh commented 2 months ago

This PR adds a recommendation to use the -k flag when invoking launchctl kickstart to ensure that the Nix daemon is launched even if it is already running.

For context: while bootstrapping a new machine running MacOS today I ran into a small issue when setting up Nix + devenv. Specifically I installed Nix using the Determinate Systems installer then ran into an error when first running devenv since my user was not in the trusted-users list. When I used the suggested command I kept getting the same error since the Nix daemon had not actually been restarted which led me to try with the additional -k flag. I'm fairly new to MacOS, but from what I can tell on the launchctl docs this additional flag is required to actually restart the service.