Here’s a neat workaround:
- Tell git to track
flake.nixbut without adding it:git add --intent-to-add flake.nix - Tell git to assume that
flake.nixdoesn’t have any changes:git update-index --assume-unchanged flake.nix
This way you end up with a clean git status, but flake.nix still being tracked by git and therefore accessible to Nix. The only restriction is that you can’t do git operations which would modify/remove the flake.nix
This sounds perfect for a local workaround