nixos/installation-device: allow nix-copy for root/nixos user

For non-interactive installation it's quite handy to be able to nix copy additional dependencies to the system.
While this is possible for the root user, we cannot easily ssh into it, as we don't allow root login with a password.
By making nixos a trusted user, we can do "passwd && sudo systemctl start sshd" and than run nixos-anywhere
This commit is contained in:
Jörg Thalheim 2023-08-07 16:48:37 +02:00
parent 3013bd06cb
commit 1f1a758e95

View file

@ -120,5 +120,8 @@ with lib;
[PStore]
Unlink=no
'';
# allow nix-copy to live system
nix.settings.trusted-users = [ "root" "nixos" ];
};
}