10
submitted 5 months ago by mawkler@lemmy.ml to c/nix@programming.dev

I've always hated the fact that Nix silently ignores any file that's not tracked by Git. Partly because I always forget this and have to re-build every time that I add a new file. But also the fact that Nix is coupled to VCS.

jj is a new VCS that wraps git. jj has a slightly different (improved) workflow, and doesn't have a staging area. What this means for Nix is that whenever I create a new file I have to run jj status (the equivalent to git status) before I can build with Nix, which feels incredibly silly to me.

Thanks for coming to my Ted talk.

all 6 comments
sorted by: hot top new old
[-] moonpiedumplings@programming.dev 7 points 5 months ago

Are you using flakes? I think this is a flakes specific thing.

[-] Laser@feddit.org 3 points 5 months ago

Well, it doesn't silently ignore files, it tells you if the work tree is dirty.

Though I've tripped over the different behaviors of the repl vs the rest of the tools myself in funny ways

[-] Corbin@programming.dev 1 points 4 months ago

Get in the habit of running jj desc midway through a commit. Have you just discovered an insight in an old module? Do you see how you will write the next few hunks of code? Did you have a moment of clarity where you zoomed out and saw what the next week will look like? Document it! Let your commit messages have multiple paragraphs, each written at a different time. Fill your commits with annotations about what you were doing so that future-you will understand past-you.

The reasoning here is that, aside from the jj file subcommands which directly alter the index, almost any jj subcommand will work. You might as well pick a subcommand which advances your goals.

[-] onlinepersona@programming.dev 0 points 4 months ago

Never seen this behavior. Since when is nix tied to git? Are you using lix or something?

[-] Corbin@programming.dev 4 points 4 months ago

They're using flakes.

this post was submitted on 02 Apr 2026
10 points (85.7% liked)

Nix / NixOS

2851 readers
1 users here now

Main links

Videos

founded 3 years ago
MODERATORS