From 9d361101239ada9295b707d1a63fc1b56da60131 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sun, 5 Apr 2026 11:20:24 +0100 Subject: [PATCH] fix(vm): fix Plymouth, SDDM, and autologin for VM testing - Add virtio_gpu to initrd.kernelModules for early graphics support in VMs. - Add 'render' group to VM users to ensure GPU acceleration. - Move autologin defaults to sddm.nix to ensure they are consistently applied. - Ensure SDDM theme has better session detection for uwsm. --- flake.nix | 6 ++++-- modules/system/sddm.nix | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 1973b76..aac8a57 100644 --- a/flake.nix +++ b/flake.nix @@ -93,11 +93,12 @@ # 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" ]; # Ensure the user has the right groups for graphical environment users.users.nixos = { isNormalUser = true; - extraGroups = [ "wheel" "video" "networkmanager" ]; + extraGroups = [ "wheel" "video" "networkmanager" "render" ]; initialPassword = "nixos"; }; } @@ -125,11 +126,12 @@ # 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" ]; # Setup default user for testing users.users.nomarchy = { isNormalUser = true; - extraGroups = [ "wheel" "video" ]; + extraGroups = [ "wheel" "video" "render" ]; initialPassword = "nixos"; }; diff --git a/modules/system/sddm.nix b/modules/system/sddm.nix index 0eb14d6..8fa657e 100644 --- a/modules/system/sddm.nix +++ b/modules/system/sddm.nix @@ -18,6 +18,11 @@ in theme = "nomarchy"; }; + services.displayManager.autoLogin = { + enable = lib.mkDefault true; + user = lib.mkDefault "nomarchy"; + }; + environment.systemPackages = [ nomarchy-sddm-theme ]; # Enable Hyprland system-level dependencies