diff options
Diffstat (limited to 'hosts/shinji/hardware.nix')
| -rw-r--r-- | hosts/shinji/hardware.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hosts/shinji/hardware.nix b/hosts/shinji/hardware.nix index b35c2a2..5a32364 100644 --- a/hosts/shinji/hardware.nix +++ b/hosts/shinji/hardware.nix @@ -1,6 +1,8 @@ { config, inputs, + pkgs, + lib, ... }: { # external defaults @@ -44,6 +46,34 @@ hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = true; + # nvidia + services.xserver.videoDrivers = ["modesetting" "nvidia"]; + hardware.nvidia = { + modesetting.enable = true; + powerManagement = { + enable = false; + finegrained = false; + }; + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + amdgpuBusId = "PCI:115:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + unfreePackages = [ + "nvidia-x11" + "nvidia-settings" + ]; + + # nvidia brokie + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_18; + # luks device boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ad489bfa-4280-44ea-8ad2-60347b516d60"; boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/550e638d-eade-4d2f-aa39-c38774c91af3"; |