aboutsummaryrefslogtreecommitdiff
path: root/hosts/herra/drivers.nix
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-04-29 15:14:21 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-04-29 15:14:21 +0200
commit8f1dd62736fcb672fe2c0c2eff7de9df7692e77b (patch)
tree7700ee5ac7ef6873ab3c6081ada5d1f45be26a4e /hosts/herra/drivers.nix
parent0aa9c299facc6e784354077c5d8890e923c97472 (diff)
parentcdab6b5748e60e424f3a81e91ce38034adb6867c (diff)
Merge branch 'main' of cgit:/srv/git/NixOS-config
Diffstat (limited to 'hosts/herra/drivers.nix')
-rw-r--r--hosts/herra/drivers.nix50
1 files changed, 30 insertions, 20 deletions
diff --git a/hosts/herra/drivers.nix b/hosts/herra/drivers.nix
index e731695..27b75ae 100644
--- a/hosts/herra/drivers.nix
+++ b/hosts/herra/drivers.nix
@@ -2,27 +2,37 @@
services.xserver.videoDrivers = ["amdgpu"]; # AMD GPU drivers
boot.kernel.sysctl."kernel.sched_rt_runtime_us" = -1; # Realtime audio
- hardware = {
+ hardware = {
graphics = {
- enable = true;
- enable32Bit = true; # CRITICAL for Steam/Proton
- extraPackages = with pkgs; [
- rocmPackages.clr.icd # OpenCL
- ];
- extraPackages32 = with pkgs; [
- ];
-};
+ enable = true;
+ enable32Bit = true; # CRITICAL for Steam/Proton
+ extraPackages = with pkgs; [
+ rocmPackages.clr.icd # OpenCL
+ ];
+ extraPackages32 = with pkgs; [
+ ];
+ };
+
+ cpu.intel.updateMicrocode = true;
-cpu.intel.updateMicrocode = true;
+ enableRedistributableFirmware = true;
+ };
+ #TODO: FIX
+ #boot.extraModulePackages = with boot.kernelPackages; [
+ # v4l2loopback
+ #];
+ boot.kernelModules = ["v4l2loopback"];
+ boot.extraModprobeConfig = ''
+ options v4l2loopback devices=1 video_nr=1 card_label="OBS Virtual Camera" exclusive_caps=1
+ '';
+
+ systemd.tmpfiles.rules = [
+ "w /sys/class/drm/card1/device/power_dpm_force_performance_level - - - - manual"
+ "w /sys/class/drm/card1/device/pp_dpm_sclk - - - - 7"
+ "w /sys/class/drm/card1/device/pp_dpm_mclk - - - - 1"
+ ];
-enableRedistributableFirmware = true;
-};
-#TODO: FIX
-#boot.extraModulePackages = with boot.kernelPackages; [
-# v4l2loopback
-#];
-boot.kernelModules = [ "v4l2loopback" ];
-boot.extraModprobeConfig = ''
- options v4l2loopback devices=1 video_nr=1 card_label="OBS Virtual Camera" exclusive_caps=1
-'';
+ services.udev.extraRules = ''
+ SUBSYSTEM=="hwmon", ATTRS{name}=="amdgpu", ATTR{power1_cap}="75000000"
+ '';
}