Hacker News new | ask | show | jobs
by ParetoOptimal 1038 days ago
> Flakes are coupled to git. You need to remember to stage changes whenever you do Ctrl+S in your editor before rebuilding.

You only need to `git add` the file once.

You do not need to stage every change after that before flakes can "see" the change.

2 comments

Yes, you are right - I misremembered this detail. My problem at the the time was I didn't want to commit my flake.nix to the repository in one of my previous work places (for political reasons). So I had to unstage and restage it every time I created a new commit.
> I didn't want to commit my flake.nix to the repository in one of my previous work places (for political reasons).

Does the same workplace not allow people to include config related to their editors and so on?

Even better, you can `git add -N` and just record the intent to include the file in a later commit, without staging its current contents. Nix seems happy with that.