nixos-generators
nixos-generators copied to clipboard
qcow-efi format with ESP mount and configurable diskSize
Hey folks! This PR adds the qcow-efi format based on @ashraffouda's work and @Mic92's feedback in #194. Credit to both of them for the discussing and existing work in the PR, I just consolidated it into my branch since the work in #194 appeared stalled.
Summary of these changes:
- I started wtih the commit from @ashraffouda, which adds the baseline qcow-efi image
- I've been using their work for a while and found a bug that stopped
nixos-rebuild ... switchfrom working due to the missing EFI mount point, so I added/boot, which fixes that. - @Mic92 mentioned that exposing the disk image size as an option would be a good thing to do. That makes sense, so I wrapped the format in a traditional
options = { ... }; config = { ... };form. The existing format modules do not do any of this so I had to make it up; I didn't choose to nest thediskSizeoption under any specific namespace/attribute but if there's any sort of preference it's all the same to me.
I'm actively using this format, so I know it works, but if there's anything additional y'all would like to see just let me know.
Hey, can I do something to help you get this PR to the finish line? I'm interested into it as I'm running into limitations with the existing qcow biosboot only for x86_64-linux. :)
Apologies for letting this languish a bit, I updated to latest master and addressed the feedback that I was able to. Remaining items that I can see:
- Not sure how to best address the question about the ESP partition
- I think upstream
mastermay be slightly differently-structured now, but I can adhere to any changes that need to be brought in. Looks like style(?) may be different and I couldn't find an existing format that accepts options like this PR has forconsolesanddiskSizebut it seems to work?
somehow this fell under my radar, but this looks good to me.
Thank you so much, @Lassulus!