How to update VS code in nixos?

I have installed vs code in nixos, and it shows that there is an available update but it does not update automatically. I have tried running sudo nixos rebuild switch --upgrade but it doesn’t seem to update vs code to latest version. How to I update it then?

Are you running flakes? Or what does your setup look like?

Ok, if not, my understanding is that sudo nix-channel --update should do the trick. I’m fairly new to nix, and started with flakes from day one, so I don’t use this method.

If on flakes, nix flake update

Then rebuild in both scenarios.

Depending on the channel you use you might already have the latest available version.

1.78.2 for 23.05, 1.80.1 for unstable, where unstable seems to be on-par with the latest release notes.