nix-darwin
nix-darwin copied to clipboard
darwin-rebuild leaves `./result` symlink behind when using flakes
When I use the --flake
flag, darwin-rebuild
ends up leaving a ./result
symlink behind for any action that involves a build. It looks like the script explicitly avoids adding --no-out-link
when using --flake
but I don't know why.
❯ ls -F
❯ darwin-rebuild --flake darwin-config check
building the system configuration...
ok
❯ ls -F
result@
@lilyball I fixed this myself on my fork. Feel free to use it, I'll be keeping it up to date with any changes that come upstream until this fix is in then I can move back to upstream myself. You should be able to just replace lnl7
with ryantking
in your flake.nix
and do a darwin-rebuild switch --flake /your/flake
. I did a fresh nix install since my system got into a bad state, but I'm pretty sure if you change your flake and rebuild, your darwin-rebuild
tool will now be my version with the fix.
@LnL7 I'd be happy to PR my fix, but there's already an open one (https://github.com/LnL7/nix-darwin/pull/310), that I just lifted the fix from and based it off the most recent master.
Should have been fixed by https://github.com/LnL7/nix-darwin/pull/578.