I’m trying to rebuild a remote NixOS host, but I’m encountering permissions issues. I’m rebuilding the host “manually” (i.e. not using nixos-rebuild
) because my monorepo setup is a bit unorthodox.
Currently this step fails with Permission denied
:
$ ssh ci@$target 'nix-env --profile /nix/var/nix/profiles/system --set $system'
$ # note: ci is a member of trusted-users
How can I do this without using
$ nixos-rebuild --target-host ci@$target --use-remote-sudo switch
IOW what is --use-remote-sudo
doing internally that I can replicate in my release script?