Nixos-rebuild wont create bin building the system configuration... Failed to find executable /nix/store/xxxx

sudo nixos-rebuild boot --flake .#mynixos --upgrade

building the system configuration…
Failed to find executable /nix/store/xxxx/bin/switch-to-configuration: No such file or directory

thats it no errors. it builds sucessfully but wont create the bin so on reboot it doesnt apply

when i build it with nix build and run sudo ./result/activate it works i get updated packages but goes away after i reboot.

it used to work before i made no changes to config other than nixpkgs version in flake to upgrade system and fixed breaking changes errors that followed normal stuff.

i did nix-store --gc nix-collect-garbage etc.

im stuck and i have also deleted all my prev gen

i cant get why this error is happening

You haven’t set system.switch.enable = false;, have you? Otherwise, file system corruption is my first concern. Might need to try rebuilding the path.

--upgrade does nothing with flakes, btw, you can drop it.

no way now i remember this sneaky lil demon got pushed in my config repo when i was backpacking in asia messing around with hibernation