diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2023-08-07 16:48:37 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2023-08-07 16:48:49 +0200 |
commit | 1f1a758e9523b686833edc797c0076ad8a73b49f (patch) | |
tree | 6aec9744b01b72aa461bef1cf39d4542354612f5 /nixos/modules/profiles | |
parent | 3013bd06cbe7a22c09b2e7942d787b31ca210ce4 (diff) |
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
Diffstat (limited to 'nixos/modules/profiles')
-rw-r--r-- | nixos/modules/profiles/installation-device.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix index 4120d5919d7d7..19e7eb32e833f 100644 --- a/nixos/modules/profiles/installation-device.nix +++ b/nixos/modules/profiles/installation-device.nix @@ -120,5 +120,8 @@ with lib; [PStore] Unlink=no ''; + + # allow nix-copy to live system + nix.settings.trusted-users = [ "root" "nixos" ]; }; } |