Skyler Grey | 81dd90e | 2023-03-26 10:45:11 +0000 | [diff] [blame] | 1 | { pkgs, lib, ... }: { |
| 2 | home = { |
| 3 | home.file.".config/prelaunch/amd-output-source.sh".text = '' |
| 4 | if [[ $(xrandr --listproviders | grep "AMD Radeon RX 6700 XT @ pci:0000:06:00.0") ]]; then |
| 5 | xrandr --setprovideroutputsource "AMD Radeon RX 6700 XT @ pci:0000:06:00.0" modesetting |
| 6 | fi |
| 7 | ''; |
| 8 | home.file.".config/prelaunch/amd-output-source.sh".executable = true; |
| 9 | }; |
Skyler Grey | 2bd017d | 2023-02-18 18:15:04 +0000 | [diff] [blame] | 10 | config = { |
Skyler Grey | 79a8dc1 | 2023-04-15 14:35:41 +0000 | [diff] [blame] | 11 | boot.initrd.kernelModules = [ "amdgpu" ]; |
| 12 | services.xserver.videoDrivers = [ "modesetting" "fbdev" ]; |
| 13 | /* services.xserver.defaultDepth = 24; */ |
Skyler Grey | 2bd017d | 2023-02-18 18:15:04 +0000 | [diff] [blame] | 14 | systemd.tmpfiles.rules = [ |
| 15 | "L+ /opt/rocm/hip - - - - ${pkgs.hip}" |
| 16 | ]; |
| 17 | hardware.opengl.driSupport = true; |
| 18 | hardware.opengl.driSupport32Bit = true; |
| 19 | services.hardware.bolt.enable = true; |
Skyler Grey | 79a8dc1 | 2023-04-15 14:35:41 +0000 | [diff] [blame] | 20 | /* services.xserver.config = lib.mkAfter '' */ |
| 21 | /* Section "Device" */ |
| 22 | /* Identifier "Device-radeon[1]" */ |
| 23 | /* Driver "radeon" */ |
| 24 | /* BusID "PCI:06:00.0" */ |
| 25 | /* Option "AllowExternalGpus" "True" */ |
| 26 | /* Option "AllowEmptyInitialConfiguration" */ |
| 27 | /* # Option "TearFree" "true" */ |
| 28 | /* EndSection */ |
| 29 | /* ''; */ |
Skyler Grey | 2bd017d | 2023-02-18 18:15:04 +0000 | [diff] [blame] | 30 | }; |
| 31 | } |