Skip to content

Commit

Permalink
Extend default/example config to actually work (nix-community#30)
Browse files Browse the repository at this point in the history
Now it not only builds but is also usable.

- You can login as root with password "nixos"
- You are logged in automatically on console (like installer)
- You can login as root with SSH
- You can connect to port 80

I have tested it with format "virtualbox" and "install-iso".

It's not best practice to use such insecure password,
but it's probably OK for this example for people to
see that it works.
  • Loading branch information
davidak authored and zimbatm committed Aug 15, 2019
1 parent 9edb9f7 commit 20d40bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
{
services.sshd.enable = true;
services.nginx.enable = true;

networking.firewall.allowedTCPPorts = [ 80 ];

users.users.root.password = "nixos";
services.openssh.permitRootLogin = lib.mkDefault "yes";
services.mingetty.autologinUser = lib.mkDefault "root";
}

0 comments on commit 20d40bf

Please sign in to comment.