From 66096cbc46fbf55a3d3bf1bd1daa08be706a9103 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Mon, 13 Apr 2026 13:05:59 +0100 Subject: [PATCH] feat: improve video configuration for VM and Live ISO --- core/home/config/Nomarchy.ttf | Bin 1224 -> 984 bytes core/system/default.nix | 1 + core/system/graphics.nix | 10 ++++++++++ core/system/vm-guest.nix | 5 +++++ .../waybar/themes/summer-night/config.jsonc | 2 +- .../waybar/themes/summer-night/style.css | 3 ++- hosts/live-iso.nix | 4 ++++ 7 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 core/system/graphics.nix diff --git a/core/home/config/Nomarchy.ttf b/core/home/config/Nomarchy.ttf index 4bb999d666d66ad6822ab86b931e4f73c95bdd56..b09cd9fc9f90c535259d76c1bc3641d5918fc73b 100644 GIT binary patch delta 258 zcmX@Xd4s*4fsuiMft#U$ftkU;KUm+0Ux;TB0|TQ4P&6SqH?iP>h`>!Ce+`fylAc&x z0Hg&N7?>{rX^!-q%CyegH+C^FF!6xYXQU>k=(B__1hV%4u~`OCfPE43F(CU35UXV5 zmQ?UQ0J0buX8;M2oc!d(L?FWeXaGo*CpWR8fPsra45&Z?$XCcq%uU_?I$RMbp92(g zDabD_0Xh^2m^Xmr!H#ESU{1tiJvjHzQ1jGn}3%g8#}j!~AeVsZ>) T(d284@sn+t5;m(cXEOo-iAXmi delta 499 zcmXw#K}b|l6o&tE@6+etn9eXLfr`Nl3JIb?wwM-^LLh>o1L`VoI{84KK6Dla$w(qa z5EZj#Yo)`a-N)=G7BDk9pAsE zubP^9{>)qZybP!~`InP2lO0yyN5&_#`;L>!7<*kGP$0rY)N#{`H9z$@d57FMGdE$d zflCUskt42I^l%IHtUn;P%o;cK<aJ`^8HAlocWvXza?e5C}TRWiFJ#(sn$JViPiR3<~2^1i%NIaC0lhER7y z#Zh9llvcT=(#zQBnXe}jEdSL-)$V^HAU0X$cdyP>d+DCboe8vzsl0xBQ|}h_^{R76 z-Ig&qnl5cZR1(|zRPXyeVyz*&HKtDw5-aj%+g_3vv5_-;npW=h@Ip2IiR(b2P$>KD T|1%=6c)0~%2bDCNRt5Y63OZ|a diff --git a/core/system/default.nix b/core/system/default.nix index 047d13f..12805e3 100644 --- a/core/system/default.nix +++ b/core/system/default.nix @@ -4,6 +4,7 @@ imports = [ ./options.nix ./state.nix + ./graphics.nix ./nix.nix ./scripts.nix ./systemd.nix diff --git a/core/system/graphics.nix b/core/system/graphics.nix new file mode 100644 index 0000000..0fd9da4 --- /dev/null +++ b/core/system/graphics.nix @@ -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; + }; +} diff --git a/core/system/vm-guest.nix b/core/system/vm-guest.nix index 5aeee49..f600744 100644 --- a/core/system/vm-guest.nix +++ b/core/system/vm-guest.nix @@ -7,6 +7,11 @@ 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 fileSystems."/" = lib.mkDefault { device = "/dev/disk/by-label/nixos"; }; boot.loader.grub.device = lib.mkDefault "/dev/vda"; diff --git a/features/desktop/waybar/themes/summer-night/config.jsonc b/features/desktop/waybar/themes/summer-night/config.jsonc index b70d4e5..df78992 100644 --- a/features/desktop/waybar/themes/summer-night/config.jsonc +++ b/features/desktop/waybar/themes/summer-night/config.jsonc @@ -9,7 +9,7 @@ "spacing": 15, "modules-left": ["custom/nomarchy", "clock", "clock#date"], "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": { "disable-scroll": true, diff --git a/features/desktop/waybar/themes/summer-night/style.css b/features/desktop/waybar/themes/summer-night/style.css index 1c2f39a..396d952 100644 --- a/features/desktop/waybar/themes/summer-night/style.css +++ b/features/desktop/waybar/themes/summer-night/style.css @@ -28,7 +28,7 @@ /* Spacing inside the element */ * { - font-family: JetBrainsMono Nerd Font, FontAwesome, Nomarchy; + font-family: JetBrainsMono Nerd Font, FontAwesome; font-size: 13px; font-weight: bold; } @@ -98,6 +98,7 @@ window#waybar { margin-left: 15px; padding-left: 20px; padding-right: 21px; + font-family: Nomarchy; font-size: 20px; } diff --git a/hosts/live-iso.nix b/hosts/live-iso.nix index be78597..bbb2593 100644 --- a/hosts/live-iso.nix +++ b/hosts/live-iso.nix @@ -17,6 +17,10 @@ # Ensure the live environment user has the necessary groups for graphical acceleration and audio 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" = { source = ../installer/install.sh; mode = "0755";