forked from NixOS/nixos-hardware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
34 lines (29 loc) · 1.02 KB
/
default.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
{ lib, pkgs, ... }:
let inherit (lib) mkIf 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 = {
# As of kernel version 6.6.72, amdgpu throws a fatal error during init, resulting in a barely-working display
kernelPackages = mkIf (lib.versionOlder pkgs.linux.version "6.12") pkgs.linuxPackages_latest;
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;
}