Novice question: debugging a package fix: can I locally override just a single line of a long multi-line string in a package?

stateVersion has little to do with what version of Nixpkgs are you using. It is really just to make sure NixOS modules for stateful programs can evolve without breaking existing systems on updates.

And 22.05 is actually a git tag that points to the state of the Nixpkgs repo at the time NixOS 22.05 was released so I hope you are not using it on your system – you would be missing almost two years of updates.

You can get the version of your system using nixos-version:

$ nixos-version
24.05.20240102.bd645e8 (Uakari)

For example bd645e8 is the commit id in my case.

You can checkout that commit, or the branch corresponding to the NixOS channel you use:

  • nixos-unstable for unstable
  • release-23.11 for stable

You can find the channel using sudo nix-channel --list (if you use Flakes, look into the inputs section of. flake.nix). You will also see the branch if you open the commit on GitHub.

That sounds like it might just be incompatibility because of too old Nixpkgs revision.

1 Like