From 8838709a95acc537cc6f808a2b73d84d04ec86a8 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sun, 6 Oct 2024 11:03:39 +0200 Subject: [PATCH] fix(common/hardware/oracle-vm): forgotten virtio modules Otherwise, the machine won't reboot because virtio-scsi is not available in the initrd. Signed-off-by: Raito Bezarius --- common/hardware/oracle-vm.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/hardware/oracle-vm.nix b/common/hardware/oracle-vm.nix index 4be3acf..bf76591 100644 --- a/common/hardware/oracle-vm.nix +++ b/common/hardware/oracle-vm.nix @@ -1,5 +1,5 @@ -{ lib, config, ... }: +{ lib, config, modulesPath, ... }: let cfg = config.bagel.hardware.oracle-vm; inherit (lib) mkEnableOption mkIf mkOption types; @@ -14,11 +14,18 @@ in }; }; + # Imports a bunch of virtio modules. + imports = [ + "${modulesPath}/profiles/qemu-guest.nix" + ]; + config = mkIf cfg.enable { boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" "sr_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" "virtio_pci" "usbhid" "sr_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; @@ -35,7 +42,7 @@ in # link/ether 02:00:17:00:91:6e brd ff:ff:ff:ff:ff:ff # inet 10.0.0.94/24 brd 10.0.0.255 scope global dynamic noprefixroute enp0s3 # valid_lft 44162sec preferred_lft 33362sec - # inet6 fe80::17ff:fe00:916e/64 scope link + # inet6 fe80::17ff:fe00:916e/64 scope link # valid_lft forever preferred_lft forever # [root@build02-aarch64-lahfa:~]# ip r # default via 10.0.0.1 dev enp0s3 proto dhcp src 10.0.0.94 metric 1002 mtu 9000