2022-10-05 15:57:50 +02:00
|
|
|
{ lib, pkgs, ... }:
|
2022-10-05 16:41:29 +02:00
|
|
|
let inherit (lib) mkDefault mkIf;
|
2022-10-05 15:57:50 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../../common/pc/laptop
|
|
|
|
../../common/pc/laptop/ssd
|
2023-03-23 14:46:38 +01:00
|
|
|
../../common/hidpi.nix
|
2024-06-21 23:26:44 +02:00
|
|
|
../../common/gpu/24.05-compat.nix
|
2022-10-05 15:57:50 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
# Necessary kernel modules
|
|
|
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "thunderbolt" ];
|
|
|
|
|
|
|
|
# GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU
|
|
|
|
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
|
|
|
|
services.xserver.videoDrivers = [ "intel" ];
|
2024-06-21 15:44:42 +02:00
|
|
|
hardware.graphics.extraPackages = with pkgs; [
|
2023-06-23 13:38:13 +02:00
|
|
|
intel-media-driver
|
|
|
|
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
|
|
|
|
];
|
2022-10-05 15:57:50 +02:00
|
|
|
|
|
|
|
boot.kernelParams = [
|
|
|
|
# The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise
|
|
|
|
"fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up"
|
|
|
|
];
|
|
|
|
|
|
|
|
fonts.fontconfig = {
|
|
|
|
subpixel.rgba = "vbgr"; # Pixel order for rotated screen
|
|
|
|
|
|
|
|
# The OLED display has √(1920² + 1200²) px / 8in ≃ 283 dpi
|
|
|
|
# Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow.
|
2022-10-05 16:41:29 +02:00
|
|
|
# Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594.
|
2022-10-05 15:57:50 +02:00
|
|
|
hinting.enable = mkDefault false;
|
2022-10-05 16:41:29 +02:00
|
|
|
antialias = mkIf (lib.versionOlder (lib.versions.majorMinor lib.version) "22.11") false;
|
2022-10-05 15:57:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# More HiDPI settings
|
|
|
|
services.xserver.dpi = 280;
|
|
|
|
|
|
|
|
# Necessary for audio support on the 1195G7 model
|
|
|
|
boot.extraModprobeConfig = ''
|
|
|
|
options snd-intel-dspcfg dsp_driver=1
|
|
|
|
'';
|
|
|
|
}
|