feat(installer): add one-file installer build and custom install ISO
Replace old_installer.py with a curses TUI installer packaged as a one-file PyInstaller binary (python/installer/build.py, wrapped by python/installer/package.nix). The default .#installer is patched to run on foreign Linux live media; the new .#installer-nixos variant keeps its Nix store interpreter so it runs on NixOS. Add systems/iso, a minimal NixOS install CD with kernel 6.18 and ZFS 2.4 matching the deployed systems and the installer on PATH; build it with nix build .#iso. Shared logging and subprocess helpers move out of common.py into python/logging_config.py and python/process.py.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
{
|
||||
outputs,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
image.baseName = lib.mkForce "nixos-zfs-installer";
|
||||
|
||||
# Keep the live kernel and ZFS in sync with the deployed systems so pools
|
||||
# created by the installer import cleanly on first boot.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_6_18;
|
||||
zfs.package = pkgs.zfs_2_4;
|
||||
supportedFilesystems.zfs = true;
|
||||
};
|
||||
|
||||
networking.hostName = "installer";
|
||||
|
||||
environment.systemPackages = [
|
||||
outputs.packages.${pkgs.stdenv.hostPlatform.system}.installer-nixos
|
||||
];
|
||||
|
||||
services.getty.helpLine = ''
|
||||
Run "sudo nixos-installer" to install NixOS onto a ZFS root pool.
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user