fix(vm): ensure Plymouth display and fix black screen in Hyprland

- Force essential kernel parameters for VMs (video mode, splash).
- Add necessary virtio drivers to initrd.availableKernelModules.
- Fix black screen in Hyprland by disabling hardware cursors.
- Add fallback wallpaper logic to prevent swww crashes.
This commit is contained in:
Bernardo Magri
2026-04-05 12:48:43 +01:00
parent 2afd5eaa36
commit ac6087559d
2 changed files with 14 additions and 5 deletions

View File

@@ -94,8 +94,8 @@
# Use a dummy hardware config for VM
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
boot.loader.grub.device = "/dev/vda";
boot.initrd.kernelModules = [ "virtio_gpu" ];
boot.kernelParams = [ "video=1280x800" ];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" ];
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "splash" "boot.shell_on_fail" ];
# Ensure the user has the right groups for graphical environment
users.users.nixos = {
@@ -129,8 +129,8 @@
# Use a dummy hardware config for VM
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
boot.loader.grub.device = "/dev/vda";
boot.initrd.kernelModules = [ "virtio_gpu" ];
boot.kernelParams = [ "video=1280x800" ];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" ];
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "splash" "boot.shell_on_fail" ];
# Setup default user for testing
users.users.nomarchy = {