"you are not privileged to build input-addressed derivations"
Explanation: https://nixos.org/manual/nix/unstable/installation/multi-user.html
Edit /etc/nix/nix.conf
Add a line that looks like this:
trusted-users = <list of usernames separated by whitespace>
Doc for the trusted-users setting: https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-trusted-users
Run this for the config change to take effect:
systemctl restart nix-daemon