From 2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 13 May 2020 09:42:06 +0100 Subject: [PATCH] nixos/hidpi: init --- nixos/modules/hardware/video/hidpi.nix | 16 ++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 17 insertions(+) create mode 100644 nixos/modules/hardware/video/hidpi.nix diff --git a/nixos/modules/hardware/video/hidpi.nix b/nixos/modules/hardware/video/hidpi.nix new file mode 100644 index 000000000000..ac72b652504e --- /dev/null +++ b/nixos/modules/hardware/video/hidpi.nix @@ -0,0 +1,16 @@ +{ 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 + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index d5285cfabd78..e7a09c9baa38 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -72,6 +72,7 @@ ./hardware/video/capture/mwprocapture.nix ./hardware/video/bumblebee.nix ./hardware/video/displaylink.nix + ./hardware/video/hidpi.nix ./hardware/video/nvidia.nix ./hardware/video/uvcvideo/default.nix ./hardware/video/webcam/facetimehd.nix