News for hackers. Stuff that matters.
Re:Going immutable on macOS, using Nix-Darwin by jorvi on Friday January 02, 2026 @11:47AM (#46466625)
Correct for data, not for config files. Config files are stateful unless you do the procedure I mentioned, because they're generated at first application launch.

If you try to symlink into an existing file Nix will indeed complain, which is why you have to erase the config file and then put yours in place. You can either write it out from a .nix file (pure reproducibility) or from symlink copy from a file managed by git (technically impure but effectively reproducible).

Re:Going immutable on macOS, using Nix-Darwin by copirate on Friday January 02, 2026 @12:23PM (#46467078)
But my config files (/etc, ~/.config, etc.) are either managed by nix (and no program can modify them), or they are not and in that case nix will never touch them. In what situation would nix overwrite a file?
Re:Going immutable on macOS, using Nix-Darwin by Macha on Friday January 02, 2026 @07:55PM (#46471546)
Actually Nix even errors out if the file it tries to write is already in place. I have this sometimes when I move fish functions from being defined adhoc with funcsave to putting them in my nix config because I want them on all my machines.