nixos-install: Ask the user to set a root password
This removes the need to have an initially empty root password.
This commit is contained in:
@@ -160,9 +160,4 @@ with lib;
|
||||
environment.systemPackages = [ pkgs.cryptsetup ];
|
||||
|
||||
boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
|
||||
|
||||
# Prevent logging in as root without a password. This doesn't really matter,
|
||||
# since the only PAM services that allow logging in with a null
|
||||
# password are local ones that are inaccessible on EC2 machines.
|
||||
security.initialRootPassword = mkDefault "!";
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ in
|
||||
modules =
|
||||
let extraConfig =
|
||||
{ boot.isContainer = true;
|
||||
security.initialRootPassword = mkDefault "!";
|
||||
networking.hostName = mkDefault name;
|
||||
networking.useDHCP = false;
|
||||
};
|
||||
|
||||
@@ -114,11 +114,6 @@ in
|
||||
# Always include cryptsetup so that NixOps can use it.
|
||||
environment.systemPackages = [ pkgs.cryptsetup ];
|
||||
|
||||
# Prevent logging in as root without a password. This doesn't really matter,
|
||||
# since the only PAM services that allow logging in with a null
|
||||
# password are local ones that are inaccessible on Google Compute machines.
|
||||
security.initialRootPassword = mkDefault "!";
|
||||
|
||||
# Configure default metadata hostnames
|
||||
networking.extraHosts = ''
|
||||
169.254.169.254 metadata.google.internal metadata
|
||||
|
||||
@@ -64,7 +64,6 @@ sub writeNixOSConfig {
|
||||
with lib;
|
||||
|
||||
{ boot.isContainer = true;
|
||||
security.initialRootPassword = mkDefault "!";
|
||||
networking.hostName = mkDefault "$containerName";
|
||||
networking.useDHCP = false;
|
||||
$extraConfig
|
||||
|
||||
@@ -107,9 +107,4 @@ with lib;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
services.virtualbox.enable = true;
|
||||
|
||||
# Prevent logging in as root without a password. For NixOps, we
|
||||
# don't need this because the user can login via SSH, and for the
|
||||
# demo images, there is a demo user account that can sudo to root.
|
||||
security.initialRootPassword = mkDefault "!";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user