How to handle failures on nix flake update with home-manager

I’m using home-manager for a while now and I’m quite happy with the value it delivers for me.
But one of things I run into regularly is that on a nix flake update something breaks in an package that makes my whole build fail.

For example, currently: fix: handle unset `buildInputs` by kenranunderscore · Pull Request #165 · nix-community/nixGL · GitHub

It doesn’t that happen that much, but enough that it’s a pain.

I was wondering how other people handle this. I was trying to update because I need a certain feature from an updated package, but I can’t even build because something else fails.

Are there easy ways to deal with this? Or are there recommend patterns on how to use home-manager in order to avoid this?


Expanding a little bit on this.

The options I know right now are:

  1. do nothing: wait till the option is fixed
  2. fix the problem myself in someway - by creating an overlay or something?
  3. revert the flake lock - that means I can at least update my config - but can’t update any packages.

The 4th option I am trying is to only update certain inputs, for example: nix flake update nixpkgs, but when I try to run this command on any other input the nixpkgs I get the following error:

nix flake update home-manager
error: cannot write modified lock file of flake 'flake:home-manager' (use '--no-write-lock-file' to ignore)
(use '--show-trace' to show detailed location information)

Updating to the last version of nix fixed my nix flake update problems