diff --git a/README.md b/README.md index c603d9e..09ef644 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ This is my personal nix config. #### Initial deploy -- Boot from some nixos-minimal.iso -- +- Create a iso disk image for the system using `nix build --print-out-paths --no-link .#installer-image-` +- dd the resulting image to a stick and boot from it #### Show QR for external wireguard client diff --git a/nix/generate-installer.nix b/nix/generate-installer.nix index 7236f80..62b8e51 100644 --- a/nix/generate-installer.nix +++ b/nix/generate-installer.nix @@ -4,18 +4,27 @@ ... }: nodeName: nodeAttrs: let inherit (self.hosts.${nodeName}) system; - configuration = {pkgs, ...}: { + configuration = { + pkgs, + lib, + ... + }: { system.stateVersion = "23.05"; nix.extraOptions = '' experimental-features = nix-command flakes recursive-nix ''; + isoImage.isoName = lib.mkForce "nixos-image-${nodeName}.iso"; + services.openssh = { enable = true; settings.PermitRootLogin = "yes"; }; - users.users.root.password = "nixos"; + users.users.root = { + password = "nixos"; + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"]; + }; environment = { variables.EDITOR = "nvim";