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.
This commit is contained in:
Bernardo Magri
2026-04-05 11:20:24 +01:00
parent 8a72a09bd8
commit 9d36110123
2 changed files with 9 additions and 2 deletions

View File

@@ -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";
};

View File

@@ -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