2.4 KiB
2.4 KiB
NixOS on the GPD Pocket 3
{ lib, pkgs, ... }:
{
# === gpd pocket 3 specific hax
boot.kernelParams = [
"fbcon=rotate:1"
"video=DSI-1:panel_orientation=right_side_up"
"mem_sleep_default=deep"
];
# services.xserver.config = ''
# Section "InputClass"
# Identifier "calibration"
# MatchProduct "GXTP7380"
# # 0° Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
# # 90° Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1"
# # 180° Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
# # 270° Option "TransformationMatrix" "1 0 0 0 1 0 0 0 1"
# EndSection
#
# Section "Device"
# Identifier "Device0"
# Driver "intel"
# Option "AccelMethod" "sna"
# Option "TearFree" "true"
# Option "DRI" "1"
# EndSection
#
# Section "Monitor"
# Identifier "DSI-1"
# Option "Rotate" "right"
# EndSection
#
# # Section "Monitor"
# # Identifier "DSI1"
# # Option "Rotate" "right"
# # EndSection EndSection
#
# Section "InputClass"
# Identifier "GPD Pocket 3 touchpad"
# MatchProduct "HAILUCK CO.,LTD USB KEYBOARD Mouse"
# MatchIsPointer "on"
# Driver "libinput"
# Option "AccelSpeed" "1"
# Option "MiddleEmulation" "1"
# Option "ScrollButton" "2"
# Option "ScrollMethod" "button"
# EndSection
# '';
boot.extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=1
'';
hardware.enableRedistributableFirmware = true;
hardware.sensor.iio.enable = true;
services.udev.extraRules = ''
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113", ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 1 0"
ACTION=="add|change", KERNEL=="event[0-9]*", ATTRS{name}=="GXTP7380:00 27C6:0113 Stylus", ENV{LIBINPUT_CALIBRATION_MATRIX}="1 0 0 0 1 0"
'';
services.udev.extraHwdb = ''
sensor:modalias:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 1, 0, 0
'';
services.xserver.videoDrivers = ["modesetting" "intel"];
console.font = "solar24x32.psfu.gz";
environment.systemPackages = [
pkgs.maliit-framework
pkgs.maliit-keyboard
];
services.xserver.displayManager.defaultSession = lib.mkForce "plasmawayland";
}