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"; + }) + ]; + }; }; }; }