From 39ced220025039d82f5879e531e08a1f52bb7052 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 24 Jun 2023 14:48:53 +0200 Subject: [PATCH] more --- flake.nix | 2 +- hardware/gpu/cuda.nix | 14 ++++++++++++-- hardware/gpu/intel.nix | 1 + hardware/gpu/rocm.nix | 3 +++ profiles/desktop/steam.nix | 1 + users/pbsds/home/profiles/shell.nix | 2 +- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 9bf4723..70d4062 100644 --- a/flake.nix +++ b/flake.nix @@ -106,7 +106,7 @@ # TODO: move nixos-hardware imports to the nixos configs? noximilien = mkConfig "noximilien" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel ]); bolle = mkConfig "bolle" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel ]); - nord = mkConfig "nord" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel-cpu-only common-gpu-amd ]); + nord = mkConfig "nord" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel-cpu-only common-gpu-amd common-hidpi ]); sopp = mkConfig "sopp" "pbsds.net" "x86_64-linux" (with nm; [ common-pc common-pc-ssd common-cpu-intel common-gpu-nvidia-nonprime ]); }; diff --git a/hardware/gpu/cuda.nix b/hardware/gpu/cuda.nix index 3273c43..7a70e37 100644 --- a/hardware/gpu/cuda.nix +++ b/hardware/gpu/cuda.nix @@ -15,9 +15,18 @@ ]; hardware.opengl.enable = true; - #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; + hardware.opengl.driSupport = true; + hardware.opengl.extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + + hardware.nvidia.modesetting.enable = true; # needed for most wayland compositors + hardware.nvidia.nvidiaSettings = true; + #hardware.nvidia.open = true; # open source version of kernel module, only on driver 515.43.04+ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; - #hardware.nvidia.modesetting.enable = true; + #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; + #hardware.nvidia.powerManagement.enable = true; # Fix graphical corruption on suspend/resume # add this to the host in question: #hardware.nvidia.prime = { @@ -27,6 +36,7 @@ # nvidiaBusId = "PCI:1:0:0"; #}; + environment.systemPackages = with pkgs; ([ nvtop-nvidia diff --git a/hardware/gpu/intel.nix b/hardware/gpu/intel.nix index 22e6991..60f1381 100644 --- a/hardware/gpu/intel.nix +++ b/hardware/gpu/intel.nix @@ -12,6 +12,7 @@ nixpkgs.config.libmfxSupport = true; # intel hardware.opengl.enable = true; + hardware.opengl.driSupport = true; hardware.opengl.extraPackages = with pkgs; [ mesa.drivers vaapiIntel diff --git a/hardware/gpu/rocm.nix b/hardware/gpu/rocm.nix index b68b6b7..d2041f2 100644 --- a/hardware/gpu/rocm.nix +++ b/hardware/gpu/rocm.nix @@ -9,6 +9,9 @@ nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ? nixpkgs.config.rocmSupport = true; + nixpkgs.config.openglSupport = true; + nixpkgs.config.vdpauSupport = true; + nixpkgs.config.vaapiSupport = true; hardware.opengl.enable = true; diff --git a/profiles/desktop/steam.nix b/profiles/desktop/steam.nix index e7a3af7..deb4101 100644 --- a/profiles/desktop/steam.nix +++ b/profiles/desktop/steam.nix @@ -65,6 +65,7 @@ #services.joycond.enable = true; hardware.opengl.enable = true; + hardware.opengl.driSupport = true; hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; diff --git a/users/pbsds/home/profiles/shell.nix b/users/pbsds/home/profiles/shell.nix index 6ce1974..e9edcb9 100644 --- a/users/pbsds/home/profiles/shell.nix +++ b/users/pbsds/home/profiles/shell.nix @@ -58,7 +58,7 @@ #tldr entr - axel aria + axel aria aria2 xe # xargs alternative sd # sed alternative fd # find alternative