diff --git a/flake.nix b/flake.nix index 34cd130..2869a57 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ in { from-nixos = import ./tests/from-nixos.nix inputs; + from-nixos-with-sudo = import ./tests/from-nixos-with-sudo.nix inputs; }; }; } diff --git a/nixos-remote b/nixos-remote index 3798d47..fbeb721 100755 --- a/nixos-remote +++ b/nixos-remote @@ -134,6 +134,8 @@ fi # wait for machine to become reachable (possibly forever) # TODO we probably need an architecture detection here +# TODO if we have specified a user here but we are already booted into the +# installer, than the user might not work anymore until facts=$(ssh_ -o ConnectTimeout=10 -- <&2 + """) + ''; +} diff --git a/tests/modules/installed.nix b/tests/modules/installed.nix index 0dd3efd..0dd3bc7 100644 --- a/tests/modules/installed.nix +++ b/tests/modules/installed.nix @@ -2,4 +2,11 @@ virtualisation.memorySize = 4096; services.openssh.enable = true; users.users.root.openssh.authorizedKeys.keyFiles = [ ./ssh-keys/ssh.pub ]; + users.users.nixos = { + isNormalUser = true; + openssh.authorizedKeys.keyFiles = [ ./ssh-keys/ssh.pub ]; + extraGroups = [ "wheel" ]; + }; + security.sudo.enable = true; + security.sudo.wheelNeedsPassword = false; }