-
Notifications
You must be signed in to change notification settings - Fork 44
/
graphical.nix
44 lines (40 loc) · 1.03 KB
/
graphical.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ config, lib, ... }:
let
inherit (lib)
mkIf
mkMerge
;
cfg = config.jovian.devices.steamdeck;
in
{
options = {
jovian.devices.steamdeck = {
enableXorgRotation = lib.mkOption {
default = cfg.enable;
defaultText = lib.literalExpression "config.jovian.devices.steamdeck.enable";
type = lib.types.bool;
description = ''
Whether to rotate the display panel in X11.
'';
};
};
};
config = mkMerge [
(mkIf cfg.enableXorgRotation {
environment.etc."X11/xorg.conf.d/90-jovian.conf".text = ''
Section "Monitor"
Identifier "eDP-1"
Option "Rotate" "right"
EndSection
Section "InputClass"
Identifier "Steam Deck main display touch screen"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
MatchDriver "libinput"
# 90° Clock-wise
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
EndSection
'';
})
];
}