I do need nixos-config=/etc/nixos/configuration.nix
, sorry. It’s in my config but I omitted it because I thought it wasn’t needed.
Should work with sudo though.
I’ve also got this (zoid being my username) but I think I needed that for a different reason (I think for installing unsigned derivations e.g. from cachix)
nix.trustedUsers = [ "root" "zoid" ];