about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/hardware/video/hidpi.nix
blob: c480cc481dfc65d703a69b02fa65823e708a75f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ lib, pkgs, config, ...}:
with lib;

{
  options.hardware.video.hidpi.enable = mkEnableOption "Font/DPI configuration optimized for HiDPI displays";

  config = mkIf config.hardware.video.hidpi.enable {
    console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";

    # Needed when typing in passwords for full disk encryption
    console.earlySetup = mkDefault true;
    boot.loader.systemd-boot.consoleMode = mkDefault "1";

    # TODO Find reasonable defaults X11 & wayland
    services.xserver.dpi = lib.mkDefault 192;
  };
}