Nix-rebuild test fails due to permissions failure

I’ve been running NixOS for 2 days using nix-rebuild slowly adding packages learning what configuration.nix does. Until i started getting this error.

[dekks@nixos:~]$ nixos-rebuild test
building Nix…
building the system configuration…
trace: warning: The option networking.enableIntel3945ABGFirmware' defined in /etc/nixos/hardware-configuration.nix’ has been renamed to `hardware.enableRedistributableFirmware’.
mkdir /run/nixos: Permission denied at /nix/store/x5i720pvxi5fknpj1h7ywigdf1r8l5x2-nixos-system-nixos-22.11.656.52e3e80afff/bin/switch-to-configuration line 91.
warning: error(s) occurred while switching to the new configuration

I’m assuming. dangerous i know, that as it completes Buildiing Nix + starts building the system configuration that the error isnt a nix syntax error? Plus the trace error has always been there on every rebuild i’ve done.

Any ideas?

SOLUTION Simple noob mistake - for some reason i forgot i had to run rebuild as sudo - duh