How to see what commit is my channel on?

Apparently, the solution is (thanks to rhendric):

$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-24.11
unstable https://nixos.org/channels/nixos-unstable
# Where 'unstable' is the channel name
$ cat /nix/var/nix/profiles/per-user/root/channels/unstable/svn-revision
.765432.deadbeef0123

The bit after the second . is a Git commit prefix. But be aware, that’s the current version of the chanell and what would be installed with a nixos-rebuild, not necessary your current version as there may was a nix-channel --update between. In that case, nixos-version will give you the version of your current system (same logic with the commit hash after the dot).

@ilikeavocadoes does your solution still work for you? Otherwise consider changing your “solved” to this, so other people can find it quick