diff options
Diffstat (limited to 'nixpkgs/nixos/modules/hardware/video/hidpi.nix')
-rw-r--r-- | nixpkgs/nixos/modules/hardware/video/hidpi.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/hardware/video/hidpi.nix b/nixpkgs/nixos/modules/hardware/video/hidpi.nix new file mode 100644 index 000000000000..c480cc481dfc --- /dev/null +++ b/nixpkgs/nixos/modules/hardware/video/hidpi.nix @@ -0,0 +1,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; + }; +} |