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:
@@ -94,8 +94,8 @@
|
|||||||
# Use a dummy hardware config for VM
|
# Use a dummy hardware config for VM
|
||||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" ];
|
||||||
boot.kernelParams = [ "video=1280x800" ];
|
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "splash" "boot.shell_on_fail" ];
|
||||||
|
|
||||||
# Ensure the user has the right groups for graphical environment
|
# Ensure the user has the right groups for graphical environment
|
||||||
users.users.nixos = {
|
users.users.nixos = {
|
||||||
@@ -129,8 +129,8 @@
|
|||||||
# Use a dummy hardware config for VM
|
# Use a dummy hardware config for VM
|
||||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" ];
|
||||||
boot.kernelParams = [ "video=1280x800" ];
|
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "splash" "boot.shell_on_fail" ];
|
||||||
|
|
||||||
# Setup default user for testing
|
# Setup default user for testing
|
||||||
users.users.nomarchy = {
|
users.users.nomarchy = {
|
||||||
|
|||||||
@@ -1,13 +1,22 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
activeWallpaper = config.nomarchy.wallpaper;
|
activeWallpaper = if config.nomarchy.wallpaper != "" then
|
||||||
|
config.nomarchy.wallpaper
|
||||||
|
else "${../../assets/themes/catppuccin/backgrounds/1-totoro.png}";
|
||||||
hyprlandState = config.nomarchy.hyprland;
|
hyprlandState = config.nomarchy.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
home.sessionVariables = {
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
"cursor" = {
|
||||||
|
"no_hardware_cursors" = true;
|
||||||
|
};
|
||||||
"general" = {
|
"general" = {
|
||||||
"gaps_in" = hyprlandState.gaps_in;
|
"gaps_in" = hyprlandState.gaps_in;
|
||||||
"gaps_out" = hyprlandState.gaps_out;
|
"gaps_out" = hyprlandState.gaps_out;
|
||||||
|
|||||||
Reference in New Issue
Block a user