-
-
Notifications
You must be signed in to change notification settings - Fork 903
Expand file tree
/
Copy pathdefault.nix
More file actions
52 lines (44 loc) · 1.44 KB
/
default.nix
File metadata and controls
52 lines (44 loc) · 1.44 KB
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
45
46
47
48
49
50
51
52
{ lib, pkgs, ... }:
let
inherit (lib) mkDefault;
in
{
imports = [
../../common/pc/laptop
../../common/pc/ssd
../../common/hidpi.nix
];
# 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
hardware.graphics.extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
];
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"
];
# Turn on IIO for accelerometer screen rotation.
hardware.sensor.iio.enable = lib.mkDefault true;
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.
# Set manually, as the hiDPI module had incorrect settings prior to NixOS 22.11; see nixpkgs#194594.
hinting.enable = mkDefault false;
};
# More HiDPI settings
services.xserver.dpi = 280;
# Necessary for audio support on the 1195G7 model
boot.extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=1
'';
}