jimmyff

Fun loving creative (he/him) πŸ³οΈβ€πŸŒˆ

09Oct 25

Keeping my Nix inputs fresh

Nix's approach to reproducibility means programs live in read-only storage and can't self-updateβ€”you manage everything manually. After moving to Nix full-time, my initial setup meant updating everything at once: AI tools, developer tooling, and my desktop environment. This got annoying fast, since I like to update AI stuff almost daily, dev tools weekly, and my desktop maybe monthly.

I split my nixpkgs into specialized inputs (pkgs-ai, pkgs-dev-tools, pkgs-desktop) so I could update them independently, but I had no easy way to see which inputs actually had updates available.

Terminal output showing flake-freshness checking packages across nixpkgs inputs

So, I created a little nushell script called flake-freshness that checks my inputs and shows what needs updating. It compares my flake.lock versions against upstream, caches the results to avoid repeated nix eval calls.

I run it on system startup so I get a quick overview before deciding what to update. It's made managing multiple inputs a lot less of a chore.

Splatoon characters Callie & Marie with the text 'Stay Fresh!'

My entire Nix config, including other scripts like this, is available on GitHub: github.com/jimmyff/nixfiles. Stay Fresh! πŸ¦‘