2 minutes reading time
Updated 15 Jul 2025
...you may not have noticed that it is obligatory to declare certain lines for automatic storage clean ups in your configuration.nix. Otherwise, you might end up in the worst-case scenario with not a single free inode left to link.
I use btrfs and had already completed 120 builds when my system crashed during the 121st build process, displaying an error like "no space left on device," even though I had a few hundred unused gigabytes available.
It turned out that hundreds of thousands of files and system links had been created over time, which consumed all of my inodes. I assume that nixos preserved a legacy software package release history on my disk. At that point, it became impossible to rebuild nixos.
❌ Result: You can't simply comment out something in the configuration.nix nor initiate garbage collection rules there, because it's too late.
├──[ 1. checking partition stats ]
╰──[ 2. running garbage-collector ]