From 9db059df5a2a24d4e8ce680f00c3a52c967d8665 Mon Sep 17 00:00:00 2001 From: erik Date: Sun, 12 Jul 2026 22:42:29 +0200 Subject: [PATCH] feat: USB recovery installer ISO (ssh key baked in) for headless reinstall --- flake.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/flake.nix b/flake.nix index dbccf76..c8876f0 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,25 @@ }) ]; }; + + # Bootable USB recovery installer with our SSH key + sshd + DHCP. + # Build the ISO: + # nix build .#nixosConfigurations.installer-iso.config.system.build.isoImage + # dd it to a USB stick, boot the ZimaBlade from it, SSH in, ./deploy install. + installer-iso = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") + ({ ... }: { + services.openssh.enable = true; + services.openssh.settings.PermitRootLogin = "prohibit-password"; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGZpkPVhzi1zG5JI9hWyUgdyvNIQbp4ts4jw3idpMhhN erik@laptop" + ]; + networking.hostName = "jupiter-installer"; + }) + ]; + }; }; }; }