From 3883dfe5eead7cbf48c1582297b4ab23e6cb0f31 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Thu, 16 Jan 2025 08:43:20 +0900 Subject: [PATCH] gpd/pocket-4: init --- README.md | 1 + flake.nix | 1 + gpd/pocket-4/default.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 gpd/pocket-4/default.nix diff --git a/README.md b/README.md index 5f946f2..9e8e624 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ See code for all available configurations. | [GPD MicroPC](gpd/micropc) | `` | | [GPD P2 Max](gpd/p2-max) | `` | | [GPD Pocket 3](gpd/pocket-3) | `` | +| [GPD Pocket 4](gpd/pocket-4) | `` | | [GPD WIN 2](gpd/win-2) | `` | | [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `` | | [GPD WIN Mini 2024](gpd/win-mini/2024) | `` | diff --git a/flake.nix b/flake.nix index b925530..3608efa 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,7 @@ gpd-micropc = import ./gpd/micropc; gpd-p2-max = import ./gpd/p2-max; gpd-pocket-3 = import ./gpd/pocket-3; + gpd-pocket-4 = import ./gpd/pocket-4; gpd-win-2 = import ./gpd/win-2; gpd-win-max-2-2023 = import ./gpd/win-max-2/2023; gpd-win-mini-2024 = import ./gpd/win-mini/2024; diff --git a/gpd/pocket-4/default.nix b/gpd/pocket-4/default.nix new file mode 100644 index 0000000..d4c9624 --- /dev/null +++ b/gpd/pocket-4/default.nix @@ -0,0 +1,29 @@ +{ lib, pkgs, ... }: +let inherit (lib) mkDefault; +in +{ + imports = [ + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/amd + ../../common/hidpi.nix + ]; + + boot.kernelParams = [ + # The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise + "fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up" + ]; + + fonts.fontconfig = { + subpixel.rgba = "vbgr"; # Pixel order for rotated screen + + # The display has √(2560² + 1600²) px / 8.8in ≃ 343 dpi + # Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow. + hinting.enable = mkDefault false; + }; + + # More HiDPI settings + services.xserver.dpi = 343; +}