summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-05-13 09:42:06 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-05-25 09:17:25 +0100
commit2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4 (patch)
tree0b0231006e180d87a4edb554f66f036d7514708c
parent435340ed58ac802e53e0651b060123f73c769863 (diff)
downloadnixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.tar
nixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.tar.gz
nixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.tar.bz2
nixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.tar.lz
nixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.tar.xz
nixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.tar.zst
nixpkgs-2fb5a9999f2236ce76c8a78baf6ca8a4ce1289c4.zip
nixos/hidpi: init
-rw-r--r--nixos/modules/hardware/video/hidpi.nix16
-rw-r--r--nixos/modules/module-list.nix1
2 files changed, 17 insertions, 0 deletions
diff --git a/nixos/modules/hardware/video/hidpi.nix b/nixos/modules/hardware/video/hidpi.nix
new file mode 100644
index 00000000000..ac72b652504
--- /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 d5285cfabd7..e7a09c9baa3 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