Error: value is null while a Boolean was expected - where to start?

I have the following error which first occurred towards the end of last month, went away for a day, then seemed to come back!

error: value is null while a Boolean was expected

   at /nix/store/pc89i62sxfxrimyy7rhn61gz0bd6699w-source/pkgs/build-support/trivial-builders/default.nix:148:35:

      147|         passAsFile = [ "text" ];
      148|         meta = lib.optionalAttrs (executable && matches != null) {
      149|           mainProgram = lib.head matches; 

I thought it might be related to this:

But that has been closed - I read it but don’t understand it, so I am not sure if my issue is this or something similar :frowning:

I’m using flakes, unstable, and home-manager (where the error seems to manifest). If I avoid my “home manager config” I can build successfully.

Given the error does not point me to any particular config elements, I am at a loss where to start, so any suggestions welcomed.

Update your home-manager.

Please update your nixpkgs and home-manager inputs, the bug you describe only appears in a combination of commits that spans about a single week of git history or even less…

And if I also recall correctly only unstable should be affected, as the issue occured after the 23.05 branch-off.

Thanks for helping - I have updated my inputs, both all and explicitly using nix-channel --update for home-manager, nixos and nixpkgs - example output below. (I saw no change for other channels)

• Updated input ‘nixpkgs’:
‘github:NixOS/nixpkgs/4729ffac6fd12e26e5a8de002781ffc49b0e94b7’ (2023-06-06)
→ ‘github:NixOS/nixpkgs/3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f’ (2023-06-23)

I still have the same issue. I’m not sure how to check if the channels are current and up to date and couldn’t find any guidance…

You are talking about nix-channel --update and show also the output of an updated flake input.

Can you please be a bit more verbose/detailed about your HM and system setup?

Do you use HM as a system module or standalone?
Channels or flakes?
Is the configuration public?
In case of flakes what are the exact inputs of the relevant flake?
In case of channels whaht are the channels of root and the affected user?

Thanks for following up. The issue is user error here…

After a nix flake update it builds fine

Sorry to all that took the time to read and especially those who responded! I appreciate your engagement.