blob: 136c7840b40946b431d06f8d9f572313d7d3c888 [file] [log] [blame]
Skyler Greya16cb702023-03-11 19:20:06 +00001{ lib, pkgs, ... }: {
Skyler Greyf5f79892023-03-07 13:13:45 +00002 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 Greya16cb702023-03-11 19:20:06 +000017 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 Grey73c49312023-01-26 00:45:17 +000025
Skyler Greya16cb702023-03-11 19:20:06 +000026 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 Grey73c49312023-01-26 00:45:17 +000050 };
51}