LnL7 / nix-darwin

nix modules for darwin
MIT License
3.05k stars 442 forks source link

Look into updating `services.activate-system` #726

Open emilazy opened 1 year ago

emilazy commented 1 year ago

The list of activation scripts has grown a lot. services.activate-system's hasn't, which contributes to annoying configuration drift between system updates and the next explicit activation. We should figure out exactly which ones should be added or even if it's possible to just run the entire system activation script in the daemon.

LnL7 commented 1 year ago

It's not necessarily out of sync. I introduced that deamon because some things like the /run symlink would disappear after every boot as it's in a tempfs. So I only added the activation scripts for things that actually needed to be applied again.

That said it might not be a bad idea to just activate everything after boot in case system changes are overwritten by a macOS update, etc.

emilazy commented 1 year ago

My preference would be to activate the whole system, yeah, although there may need to be some exceptions to that (e.g. when Homebrew Cask runs installers they probably expect to be in a graphical context and might need to prompt the user).

hraban commented 1 year ago

Homebrew also needs network connectivity, and in general is not friendly to being run headless. I would personally like to separate homebrew from more clearly deterministic scripts in headless mode.