From c07f11bd806da0ca5caf5055d446e8a348d4b6d8 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 9 May 2022 22:17:26 +0000 Subject: feat(tazjin/modules): Add HiDPI module Change-Id: Ib690ec25ebe10af4924735553a8315609b7cbc4e Reviewed-on: https://cl.tvl.fyi/c/depot/+/5566 Tested-by: BuildkiteCI Reviewed-by: tazjin --- users/tazjin/nixos/modules/hidpi.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 users/tazjin/nixos/modules/hidpi.nix (limited to 'users/tazjin/nixos/modules/hidpi.nix') diff --git a/users/tazjin/nixos/modules/hidpi.nix b/users/tazjin/nixos/modules/hidpi.nix new file mode 100644 index 0000000000..942798112a --- /dev/null +++ b/users/tazjin/nixos/modules/hidpi.nix @@ -0,0 +1,17 @@ +# Configuration for machines with HiDPI displays, which are a total +# mess, of course. +{ ... }: + +{ + # Expose a variable to all programs that might be interested in the + # screen settings to do conditional initialisation (mostly for Emacs). + environment.variables.HIDPI_SCREEN = "true"; + + # Ensure a larger font size in early boot stage. + hardware.video.hidpi.enable = true; + + # Bump DPI across the board. + # TODO(tazjin): This should actually be set per monitor, but I + # haven't yet figured out the right interface for doing that. + services.xserver.dpi = 192; +} -- cgit 1.4.1