feat(installer): enhance NixOS installer with SSH access and encryption password input
This commit is contained in:
@@ -24,11 +24,32 @@
|
||||
|
||||
networking.hostName = "installer";
|
||||
|
||||
# On flake-built systems <nixpkgs> resolves through the flake registry,
|
||||
# so nixos-install fails without these features enabled.
|
||||
nix.settings.experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
outputs.packages.${pkgs.stdenv.hostPlatform.system}.installer-nixos
|
||||
];
|
||||
|
||||
# Live-media only: sshd is already enabled by the installation profile,
|
||||
# but ssh logins need a non-empty password.
|
||||
users.users = {
|
||||
nixos = {
|
||||
password = "nixos";
|
||||
initialHashedPassword = lib.mkForce null;
|
||||
};
|
||||
root = {
|
||||
password = "nixos";
|
||||
initialHashedPassword = lib.mkForce null;
|
||||
};
|
||||
};
|
||||
|
||||
services.getty.helpLine = ''
|
||||
Run "sudo nixos-installer" to install NixOS onto a ZFS root pool.
|
||||
SSH is enabled; the "nixos" and "root" passwords are "nixos".
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user