Can't enable riff diff in git with home manager option

New user getting my bearings…

I’m trying to enable programs.git.riff.enable but when I uncomment the relevant line in my nix file I get this error:

~/.dotfiles (main)> grep riff git.nix
    pkgs.riffdiff
    riff.enable = true;

~/.dotfiles (main)> home-manager switch --flake .
error:
       … while evaluating a branch condition
         at /nix/store/qjmsdak7fhqc7pi922i2mgm45f7af9h8-source/lib/lists.nix:126:9:
          125|       fold' = n:
          126|         if n == len
             |         ^
          127|         then nul

       … while calling the 'length' builtin
         at /nix/store/qjmsdak7fhqc7pi922i2mgm45f7af9h8-source/lib/lists.nix:124:13:
          123|     let
          124|       len = length list;
             |             ^
          125|       fold' = n:

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `programs.git.riff' does not exist. Definition values:
       - In `/nix/store/akhfiaf47fphykpkamxnxz7djy7qd69f-source/git.nix':
           {
             enable = true;
           }

Why is this not working for me? I’ve seen similar usage in other repos

You’re using the stable versions of Nixpkgs and Home Manager, and programs.git.riff was only added to Home Manager last month. It won’t be on stable until the next release.

Omg, two in a row! What are the odds???

Is it common for people to use unstable? As a new user I though sticking to latest release would be “easier” but it seems to me that perhaps Nix is too fast-moving?

I don’t have statistics for you, but I think both are reasonably common. It’s pretty much the same trade-off you get when choosing between a rolling release distro like Arch and a point release distro like Debian. I use stable, I know I’m not the only one, but it does mean that I wait a few more months to get the absolute newest software (unless I need it so much that I pull something in from unstable manually). In exchange for that, I have a system that only surprises me with upgrade breakage once or twice a year.