NixOS AWS | 64 Members | |
| 14 Servers |
| Sender | Message | Time |
|---|---|---|
| 6 Sep 2024 | ||
In reply to @arianvp:matrix.orgOh nice, time to try this out then to remove nested virtualization (via KVM) from the bootstrap requirements then | 17:29:55 | |
| The reason I'm particularly sensitive to bootstrap is related to the GitLab runner fleet I mentioned in the AWSTOE issue. With GitHub, there's GitHub-hosted runners which provide some "fixed"/"stable" bootstrap machines (i.e. x86-64 and AArch64 Linux runners). With a private GitLab instance, you have no runners to start. For ease of deployability, I also can't assume too much of the initial system used to build up any IaC templates to deploy bootstrap infra to AWS or whatever. | 17:32:33 | |
| * The reason I'm particularly sensitive to bootstrap is related to the GitLab runner fleet I mentioned in the AWSTOE issue. With GitHub, there's GitHub-hosted runners which provide some "fixed"/"stable" bootstrap machines (i.e. x86-64 and AArch64 Linux runners). With a private GitLab instance, you have no runners to start. For ease of deployability, I also can't expect too much from the initial system used to build up any IaC templates to deploy bootstrap infra to AWS or whatever (i.e. shouldn't expect cross-compile or emulated native compile capabilities since these may be Darwin or Windows machines). | 17:33:16 | |
In reply to @arianvp:matrix.orgI believe this is only true on virts (instances using the Nitro Hypervisor). Metals have direct hardware access so as long as the AMI used there support KVM, it's usable. Not that it's a hard requirement for make-disk-image like you said since QEMU can just swap the backend. | 17:43:54 | |
In reply to @arianvp:matrix.org* I believe this is only true on virts (instances using the Nitro Hypervisor). Metals have direct hardware access so as long as the AMI used there supports KVM, it's usable. Not that it's a hard requirement for make-disk-image like you said since QEMU can just swap the backend. | 17:44:48 | |
| 7 Sep 2024 | ||
| Hmm playing around with
Only step 2 requires booting up a VM. Essentially, it takes the disk image from step 1 and then runs NixOS install steps. Step 1 doesn't require a VM just like
| 00:56:55 | |
| * Hmm playing around with
Only step 2 requires booting up a VM. Essentially, it takes the disk image from step 1 and then runs NixOS install steps. Step 1 doesn't require a VM just like
| 00:58:56 | |
| * Hmm playing around with
Only step 2 requires booting up a VM. Essentially, it takes the disk image from step 1 and then runs NixOS install steps. Step 1 doesn't require a VM just like
| 01:00:23 | |
| Maybe there's something I'm misunderstanding about the UKI that should be included in appliances. https://nixos.org/manual/nixos/stable/#sec-image-repart-appliance There's this repo which seems to be producing a working image that the author is using: https://github.com/tnytown/nixos-lima-vm Trying to do the same thing and launching the | 02:16:07 | |
| * Maybe there's something I'm misunderstanding about the UKI that should be included in appliances. Maybe it includes systemd and some other stuff that removes the need for the https://nixos.org/manual/nixos/stable/#sec-image-repart-appliance There's this repo which seems to be producing a working image that the author is using: https://github.com/tnytown/nixos-lima-vm Trying to do the same thing and launching the | 02:16:54 | |
| * It seems there's something I'm misunderstanding about the UKI that should be included in appliances. Maybe it includes systemd and some other stuff that removes the need for the https://nixos.org/manual/nixos/stable/#sec-image-repart-appliance There's this repo which seems to be producing a working image that the author is using: https://github.com/tnytown/nixos-lima-vm Trying to do the same thing and launching the | 02:22:06 | |
Hmm even the current image I'm generating with make-nix-image hangs, so either something's wrong with both my images or my QEMU setup is broken. | 03:05:09 | |
* Hmm even the current image I'm generating with make-nix-image hangs, so either something's wrong with both my images or my QEMU setup is broken. NixOS test VMs seem to work fine though (since I was able to run the one used in the amazon-cloudwatch-agent NixOS tests fine). | 03:05:37 | |
| * Hmm playing around with
Only step 2 requires booting up a VM and is optional if you don't need a full NixOS install. Essentially, it takes the disk image from step 1 and then runs NixOS install steps. Step 1 doesn't require a VM just like
| 16:58:36 | |
| * Hmm playing around with
Only step 2 requires booting up a VM and is optional if you don't need a full NixOS install. Essentially, it takes the disk image from step 1 and then runs NixOS install steps. Step 1 doesn't require a VM just like
| 16:58:50 | |
| Nevermind, it's because I disabled hardware virtualization awhile back in an attempt to fix some stability problems. Turning it back on and forcing QEMU to use UEFI lets it proceed. | 18:26:17 | |
| * Nevermind, it's because I disabled hardware virtualization awhile back in an attempt to fix some stability problems. Turning it back on and forcing QEMU to use UEFI lets it proceed. Just fails to mount the root partition now. | 20:57:27 | |
| * Hmm playing around with
Only step 2 requires booting up a VM and is optional if you don't need a full NixOS install. Essentially, it takes the disk image from step 1 and then runs NixOS install steps. Step 1 doesn't require a VM just like
| 21:00:52 | |
| 14 Sep 2024 | ||
| There is no need for nixos-install to make a nixos image | 08:04:36 | |
| You just need a /nix/store. The initrd takes care of setting up all other directories on startup | 08:04:58 | |
| And you need to register the nix store paths into the nix database | 08:05:10 | |
| I can make you a little example that is not appliance based | 08:05:25 | |
| But need to catch a boat now first :') | 08:05:43 | |
| There's also no need for UKIs. You can just put a classic systemd-boot bootloader entry on the ESP as well | 08:06:21 | |
| https://github.com/NixOS/amis/blob/main/modules/amazon-image.nix | 08:07:01 | |
| yeah I have a non-UKI version in a local file I haven't pushed. Didn't get the root partition mount working yet since I got distracted with the EC2 SSH utils stuff (need to get EC2 Instance Connect working for the GitLab auto-scaling AWS runners) | 08:07:29 | |
| This is missing the nix store path registration part though | 08:07:31 | |
| So can do like a boot.postBootCommands =
| 08:10:30 | |
| Someone made the bash script work with nix too | 08:10:52 | |
| Did you see that? Though a go version does sound better tbh | 08:11:07 | |