Those instructions are pretty much entirely wrong. They will only give you an update to the latest commit of NixOS 23.05, you will not be upgrading to 23.11. Don’t rely on LLMs for things you don’t understand yourself.
You need to start off by changing your channel, as the manual instructs.
If you’re really struggling to understand it, assuming you’re using the most defaultest NixOS 23.05, you need to run these commands:
sudo nix-channel --add https://channels.nixos.org/nixos-23.11 nixos
sudo nixos-rebuild boot --upgrade
# You probably get some errors and warnings here that you need to take care
# of, do so and repeat until the above command succeeds
sudo shutdown -r now
A reboot is required according to the release notes, which you should really take a look at before/while upgrading. Using nixos-rebuild boot
should probably generally be recommended for full version upgrades, if only to prevent confusing people with graphics library failures.
YMMV, this doesn’t cover user channels, home-manager, niv, etc., but neither does the manual in fairness. We probably should have a more foolproof set of “this is how you upgrade” instructions somewhere.