feat(installer): enhance NixOS installer with SSH access and encryption password input

This commit is contained in:
2026-07-02 14:17:49 -04:00
committed by Richie
parent b252b0bf6e
commit ddea13b93a
4 changed files with 125 additions and 15 deletions
+21
View File
@@ -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".
'';
}