From 20d40bf692b694a83554e457d0ef351936316745 Mon Sep 17 00:00:00 2001 From: David Kleuker Date: Thu, 15 Aug 2019 13:08:11 +0200 Subject: [PATCH] Extend default/example config to actually work (#30) 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. --- configuration.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configuration.nix b/configuration.nix index 81610b4..9a85ef8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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"; }