2 Jul 2024 |
colemickens | for now this works, gotta figure out why this isn't playing nice with the arm64 version now. | 06:54:20 |
3 Jul 2024 |
matthewcroughan | If vendor kernels are in use, it's easy to make the disk image builder stall | 18:24:34 |
matthewcroughan | blikvm-v1-disko-images> UEFI firmware (version built at 00:00:00 on Jan 1 1980)
blikvm-v1-disko-images> EFI stub: Decompressing Linux Kernel...
blikvm-v1-disko-images> EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
blikvm-v1-disko-images> EFI stub: Generating empty DTB
blikvm-v1-disko-images> EFI stub: Exiting boot services...
| 18:24:36 |
matthewcroughan | https://github.com/nix-community/disko/commit/bb75ad0b1d5a63884586517920b9a189721fc54d | 18:28:34 |
matthewcroughan | This commit was so much more problematic than I anticipated | 18:28:42 |
matthewcroughan | I should make it possible to override this | 18:28:50 |
4 Jul 2024 |
| eyJhb left the room. | 10:58:18 |
| Philip Taron (UTC-8) left the room. | 15:46:39 |
| Philip Taron (UTC-8) joined the room. | 15:55:30 |
| Benedikt changed their display name from Soispha to Benedikt. | 19:11:30 |
| @vartroc:matrix.org left the room. | 19:17:56 |
5 Jul 2024 |
matthewcroughan | Anyone wanna help? | 20:36:48 |
matthewcroughan | blikvm-v1-disko-images> qemu-system-aarch64: failed to load "/nix/store/d2vw2hx48nphic1n4xd8y43q5vdn4lfk-kernel-modules/vmlinuz.efi" | 20:36:49 |
matthewcroughan | why would that happen.. | 20:36:56 |
matthewcroughan | this is me, trying to make my PR to make the image builder kernel configurable | 20:41:18 |
matthewcroughan | It's quite a minimal PR | 20:41:41 |
matthewcroughan | diff --git a/lib/make-disk-image.nix b/lib/make-disk-image.nix
index a61e937..e1f7e36 100644
--- a/lib/make-disk-image.nix
+++ b/lib/make-disk-image.nix
@@ -10,7 +10,7 @@ let
vmTools = pkgs.vmTools.override {
rootModules = [ "9p" "9pnet_virtio" "virtio_pci" "virtio_blk" ] ++ nixosConfig.config.disko.extraRootModules;
kernel = pkgs.aggregateModules
- (with nixosConfig.config.boot.kernelPackages; [ kernel ]
+ (with nixosConfig.config.disko.imageBuilderKernelPackages; [ kernel ]
++ lib.optional (lib.elem "zfs" nixosConfig.config.disko.extraRootModules) zfs);
};
cleanedConfig = diskoLib.testLib.prepareDiskoConfig nixosConfig.config diskoLib.testLib.devices;
diff --git a/module.nix b/module.nix
index 8c8fbc3..e3fde41 100644
--- a/module.nix
+++ b/module.nix
@@ -10,6 +10,15 @@ let
in
{
options.disko = {
+ imageBuilderKernelPackages = lib.mkOption {
+ type = lib.types.attrs;
+ description = ''
+ the kernel used when building disk images via make-disk-image.nix.
+ Useful when the config's kernel won't boot in the image-builder.
+ '';
+ default = config.boot.kernelPackages;
+ example = lib.literalExpression "pkgs.linuxPackages_testing";
+ };
extraRootModules = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = ''
| 20:41:59 |
| ૮༼⚆︿⚆༽つ / wildan joined the room. | 20:46:17 |
matthewcroughan | Oh.. it's because my config for the thing I'm building an image for actually modifies the nixpkgs.hostPlatform of the disko image builder.. | 21:30:45 |
matthewcroughan | it's a bit too intertwined I think | 21:30:50 |
matthewcroughan | disko's image builder should not care about the nixosConfig as much as it does, it inherits too much | 21:31:18 |
matthewcroughan | i.e it needs its own pkgs instance, uneffected by the nixosConfig's overlays and stuff | 21:32:15 |
matthewcroughan | https://github.com/nix-community/disko/blob/master/lib/make-disk-image.nix#L3 | 21:33:26 |
matthewcroughan | Ah there it is.. yeah we need a module option namespace now | 21:33:34 |
matthewcroughan | disko.image-builder.pkgs for example should exist and be overridable, and all the other options we have should be inside of disko.image-builder | 21:33:56 |
matthewcroughan | I will pr that shortly | 21:59:05 |
8 Jul 2024 |
| wolfeexd joined the room. | 03:35:38 |
matthewcroughan | After so much hacking I finally managed to solve that problem, but it's a huge hack | 14:53:54 |
matthewcroughan | we'll end up maintaining almost all of `vmTools | 14:54:00 |
matthewcroughan | * we'll end up maintaining almost all of `vmTools` | 14:54:04 |