and that seems to work but I’m not sure I picked the correct ref (there is also 24.11 and release-24.11 and I don’t know what the difference is). All the examples I can find, suggest either the syntax "github:nixos/nixpkgs/nixos-X.Y" which 404s (I assume something changed on the GitHub end), or they seem to be tracking unstable instead of a specific release.
Note that I want behavior equivalent to the 24.11 channel, i.e. deleting flake.lock and rebuilding the flake should pick up bugfixes.
Should be the same.
But the syntax you are looking for is like this:
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
You can just run this command nix flake update where your flake is and this updates your flake.lock file. No need to delete the lock file.
After that you can do a rebuild like normal and it should have updated.
And yeah deleting the lockfile subverts the entire purpose of a lockfile. You should be using version control so you can rollback the lockfile if an update doesn’t work out.
I could have sworn that this no longer worked. That was the whole reason I started down this rathole, I was getting 404 errors from Github that implied that they had changed something on their end and this would now try to pull a subdirectory named nixos-24.11, rather than a branch. But today it works again. ¯\_(ツ)_/¯
Thanks, that’s helpful. Is there documentation somewhere of what the difference is and the intended purpose of the other references?
I am doing that on purpose for that exact reason. Let’s not get sidetracked, please?
Not a sidetrack, I answered your question. Honestly, not much point in using flakes if you’re deleting the lockfile, at that point it’s arguably worse than channels (since with channels you could rollback using nix commands).