blob: 425e7da209fe2a73f7fb90dccfd70a914616c79e [file] [log] [blame]
Skyler Greya16cb702023-03-11 19:20:06 +00001{ lib, pkgs, ... }: {
Skyler Grey81dd90e2023-03-26 10:45:11 +00002 config.boot.kernelParams = [
3 "video=eDP-1:2256x1440@60"
4 "video=HDMI-A-1:3840x2160@76"
5 ];
Skyler Greya16cb702023-03-11 19:20:06 +00006 home = {
7 services.grobi = {
8 enable = true;
9 rules = (map
10 (output: {
11 name = "Docked (${output})";
12 outputs_connected = [ output "eDP-1" ];
13 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 +000014
Skyler Greya16cb702023-03-11 19:20:06 +000015 atomic = true;
16 primary = "eDP-1";
17 })
18 ([ "HDMI-A-1" "HDMI-A-1-0" ] ++
19 (map (num: "DP-" + toString num) (lib.range 1 8))
20 )) ++ [
21 {
22 name = "Free";
23 outputs_connected = [ "eDP-1" ];
24 outputs_disconnected = [ "HDMI-A-1" ];
25 configure_single = "eDP-1";
26 }
27 {
28 name = "Fallback";
29 configure_single = "eDP-1";
30 }
31 ];
32 };
33
34 home.file.".config/prelaunch/desktop-portals.sh".text = ''
35 ${pkgs.grobi}/bin/grobi watch -v
36 '';
37 home.file.".config/prelaunch/desktop-portals.sh".executable = true;
38 systemd.user.services.grobi.Install.WantedBy = lib.mkForce [ ];
Skyler Grey73c49312023-01-26 00:45:17 +000039 };
40}