Collected Nixperience

Started
Published
Last updated

I really like Nix. I use NixOS or nix-darwin every day. I started using NixOS for the same reason that I started using Arch: it makes a lot of things easier. This is not a hit piece! I am pro-flakes!

However, I have been saved by other blogs documenting a specific issue, so I would like to give back to the interwebsitesphere. I am no Nix expert, but this will at least be useful for me![1]

Meta notes

Resources

By design, this document is essentially all redundant information, so here are some Nix resources in no particular order:

Flakes copy without Git

Or: flake stuck copying, devshell copying, flake copies directory

Without a Git repository, Flakes will conservatively copy your tree to the store. You can fix this by initializing a Git repository and adding your flake.nix to it.

I ran into this when a change to the flake for my Lean fun directory caused direnv to take a long time and rapidly use disk space. A Reddit comment brought me to the actual problem, but this Discourse thread is a better source.


  1. I’ve had this idea for a while. ↩︎
  2. Once I have the exact words to describe my quandary, it’s usually easy to solve anyway. ↩︎