feat(tazjin/modules): Add HiDPI module

Change-Id: Ib690ec25ebe10af4924735553a8315609b7cbc4e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5566
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2022-05-09 22:17:26 +00:00 committed by tazjin
parent 302b754d7a
commit c07f11bd80
2 changed files with 18 additions and 0 deletions

View file

@ -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;
}

View file

@ -15,6 +15,7 @@ in
imports = [
(usermod "desktop.nix")
(usermod "fonts.nix")
(usermod "hidpi.nix")
(usermod "home-config.nix")
(usermod "laptop.nix")
(usermod "persistence.nix")