From 018120c71ca267dd2fbe8d7c4b34ed82abbc8798 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 14 Sep 2024 12:41:59 +0530 Subject: [PATCH] layne/wynne: mess with gpu stuff --- hosts/layne/default.nix | 4 ++++ hosts/layne/hardware/default.nix | 6 +++++- hosts/wynne/default.nix | 4 ++++ hosts/wynne/hardware/default.nix | 6 +++++- hosts/wynne/services/apps/acomputer.lol.nix | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/hosts/layne/default.nix b/hosts/layne/default.nix index 7f24d20..2bfa6e5 100644 --- a/hosts/layne/default.nix +++ b/hosts/layne/default.nix @@ -12,6 +12,10 @@ _: { nix.auto-gc = true; }; + environment.sessionVariables = { + VDPAU_DRIVER = "va_gl"; + }; + i18n = { defaultLocale = "en_US.UTF-8"; extraLocaleSettings = { diff --git a/hosts/layne/hardware/default.nix b/hosts/layne/hardware/default.nix index ee26701..035f89a 100644 --- a/hosts/layne/hardware/default.nix +++ b/hosts/layne/hardware/default.nix @@ -4,6 +4,10 @@ hardware = { cpu.intel.updateMicrocode = lib.mkDefault true; enableRedistributableFirmware = true; + graphics = { + enable = true; + extraPackages = with pkgs; [ intel-media-driver vpl-gpu-rt libvdpau-va-gl ]; + }; }; boot = { @@ -15,7 +19,7 @@ }; kernelModules = [ "kvm-intel" ]; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - kernelParams = [ ]; + kernelParams = [ "i915.enable_fbc=1" "i915.enable_psr=2" ]; kernel.sysctl = { "vm.swappiness" = 10; "vm.dirty_ratio" = 3; diff --git a/hosts/wynne/default.nix b/hosts/wynne/default.nix index 7f24d20..2bfa6e5 100644 --- a/hosts/wynne/default.nix +++ b/hosts/wynne/default.nix @@ -12,6 +12,10 @@ _: { nix.auto-gc = true; }; + environment.sessionVariables = { + VDPAU_DRIVER = "va_gl"; + }; + i18n = { defaultLocale = "en_US.UTF-8"; extraLocaleSettings = { diff --git a/hosts/wynne/hardware/default.nix b/hosts/wynne/hardware/default.nix index ee26701..035f89a 100644 --- a/hosts/wynne/hardware/default.nix +++ b/hosts/wynne/hardware/default.nix @@ -4,6 +4,10 @@ hardware = { cpu.intel.updateMicrocode = lib.mkDefault true; enableRedistributableFirmware = true; + graphics = { + enable = true; + extraPackages = with pkgs; [ intel-media-driver vpl-gpu-rt libvdpau-va-gl ]; + }; }; boot = { @@ -15,7 +19,7 @@ }; kernelModules = [ "kvm-intel" ]; kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - kernelParams = [ ]; + kernelParams = [ "i915.enable_fbc=1" "i915.enable_psr=2" ]; kernel.sysctl = { "vm.swappiness" = 10; "vm.dirty_ratio" = 3; diff --git a/hosts/wynne/services/apps/acomputer.lol.nix b/hosts/wynne/services/apps/acomputer.lol.nix index a2b743d..48df1b3 100644 --- a/hosts/wynne/services/apps/acomputer.lol.nix +++ b/hosts/wynne/services/apps/acomputer.lol.nix @@ -11,7 +11,7 @@ _: { handle /.well-known/matrix/client { header Content-Type application/json header Access-Control-Allow-Origin * - respond `{"m.homeserver": {"base_url": "https://matrix.acomputer.lol:443"}, "org.matrix.msc3575.proxy": {"url": "https://matrix.acomputer.lol"}}` + respond `{"m.homeserver": {"base_url": "https://matrix.acomputer.lol:443"}, "org.matrix.msc3575.proxy": {"url": "https://matrix.acomputer.lol"}}` } ''; };