feat: improve video configuration for VM and Live ISO

This commit is contained in:
Bernardo Magri
2026-04-13 13:05:59 +01:00
parent 8e4e801244
commit 66096cbc46
7 changed files with 23 additions and 2 deletions

Binary file not shown.

View File

@@ -4,6 +4,7 @@
imports = [ imports = [
./options.nix ./options.nix
./state.nix ./state.nix
./graphics.nix
./nix.nix ./nix.nix
./scripts.nix ./scripts.nix
./systemd.nix ./systemd.nix

10
core/system/graphics.nix Normal file
View File

@@ -0,0 +1,10 @@
{ lib, ... }:
{
# Enable OpenGL/Graphics for Wayland Compositors (Hyprland)
# This provides better resolution and smoothness for all platforms.
hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
};
}

View File

@@ -7,6 +7,11 @@
virtualisation.qemu.options = [ "-device" "virtio-vga" ]; virtualisation.qemu.options = [ "-device" "virtio-vga" ];
}; };
# Improve VM resolution and guest experience
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
services.xserver.videoDrivers = [ "qxl" "virtio" "modesetting" ];
# Dummy hardware config for VM # Dummy hardware config for VM
fileSystems."/" = lib.mkDefault { device = "/dev/disk/by-label/nixos"; }; fileSystems."/" = lib.mkDefault { device = "/dev/disk/by-label/nixos"; };
boot.loader.grub.device = lib.mkDefault "/dev/vda"; boot.loader.grub.device = lib.mkDefault "/dev/vda";

View File

@@ -9,7 +9,7 @@
"spacing": 15, "spacing": 15,
"modules-left": ["custom/nomarchy", "clock", "clock#date"], "modules-left": ["custom/nomarchy", "clock", "clock#date"],
"modules-center": ["hyprland/workspaces"], "modules-center": ["hyprland/workspaces"],
"modules-right": ["custom/update", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator", "idle_inhibitor", "pulseaudio", "custom/battery", "backlight", "tray", "custom/powermenu"], "modules-right": [ "idle_inhibitor", "pulseaudio", "custom/battery", "backlight", "tray", "custom/powermenu"],
"hyprland/workspaces": { "hyprland/workspaces": {
"disable-scroll": true, "disable-scroll": true,

View File

@@ -28,7 +28,7 @@
/* Spacing inside the element */ /* Spacing inside the element */
* { * {
font-family: JetBrainsMono Nerd Font, FontAwesome, Nomarchy; font-family: JetBrainsMono Nerd Font, FontAwesome;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
} }
@@ -98,6 +98,7 @@ window#waybar {
margin-left: 15px; margin-left: 15px;
padding-left: 20px; padding-left: 20px;
padding-right: 21px; padding-right: 21px;
font-family: Nomarchy;
font-size: 20px; font-size: 20px;
} }

View File

@@ -17,6 +17,10 @@
# Ensure the live environment user has the necessary groups for graphical acceleration and audio # Ensure the live environment user has the necessary groups for graphical acceleration and audio
users.users.nixos.extraGroups = [ "wheel" "video" "render" "audio" "networkmanager" ]; users.users.nixos.extraGroups = [ "wheel" "video" "render" "audio" "networkmanager" ];
# Graphics support for live environment
boot.initrd.kernelModules = [ "amdgpu" "radeon" "nouveau" "i915" ];
services.xserver.videoDrivers = [ "amdgpu" "radeon" "nouveau" "modesetting" "fbdev" ];
environment.etc."install.sh" = { environment.etc."install.sh" = {
source = ../installer/install.sh; source = ../installer/install.sh;
mode = "0755"; mode = "0755";