Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 1 | { lib, pkgs, ... }: { |
Skyler Grey | f5f7989 | 2023-03-07 13:13:45 +0000 | [diff] [blame] | 2 | config = { |
| 3 | boot.kernelParams = [ |
| 4 | "video=eDP-1:2256x1440@60" |
| 5 | "video=HDMI-A-1:3840x2160@76" |
| 6 | ]; |
| 7 | services.xserver.config = lib.mkAfter '' |
| 8 | Section "Device" |
| 9 | Identifier "Device-radeon[1]" |
| 10 | Driver "ati" |
| 11 | BusID "PCI:06:00.0" |
| 12 | Option "AllowExternalGpus" "True" |
| 13 | Option "AllowEmptyInitialConfiguration" |
| 14 | EndSection |
| 15 | ''; |
| 16 | }; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 17 | home = { |
| 18 | services.grobi = { |
| 19 | enable = true; |
| 20 | rules = (map |
| 21 | (output: { |
| 22 | name = "Docked (${output})"; |
| 23 | outputs_connected = [ output "eDP-1" ]; |
| 24 | configure_command = "xrandr --output eDP-1 --primary --mode 2256x1504 --pos 0x2160 --rotate normal --output ${output} --mode 3840x2160 --pos 1366x0 --rotate normal"; |
Skyler Grey | 73c4931 | 2023-01-26 00:45:17 +0000 | [diff] [blame] | 25 | |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 26 | atomic = true; |
| 27 | primary = "eDP-1"; |
| 28 | }) |
| 29 | ([ "HDMI-A-1" "HDMI-A-1-0" ] ++ |
| 30 | (map (num: "DP-" + toString num) (lib.range 1 8)) |
| 31 | )) ++ [ |
| 32 | { |
| 33 | name = "Free"; |
| 34 | outputs_connected = [ "eDP-1" ]; |
| 35 | outputs_disconnected = [ "HDMI-A-1" ]; |
| 36 | configure_single = "eDP-1"; |
| 37 | } |
| 38 | { |
| 39 | name = "Fallback"; |
| 40 | configure_single = "eDP-1"; |
| 41 | } |
| 42 | ]; |
| 43 | }; |
| 44 | |
| 45 | home.file.".config/prelaunch/desktop-portals.sh".text = '' |
| 46 | ${pkgs.grobi}/bin/grobi watch -v |
| 47 | ''; |
| 48 | home.file.".config/prelaunch/desktop-portals.sh".executable = true; |
| 49 | systemd.user.services.grobi.Install.WantedBy = lib.mkForce [ ]; |
Skyler Grey | 73c4931 | 2023-01-26 00:45:17 +0000 | [diff] [blame] | 50 | }; |
| 51 | } |