Merge pull request #88669 from Mic92/hidpi
nixos/hidpi: Reasonable defaults for high-density displays
This commit is contained in:
commit
a5d20d25eb
|
@ -42,7 +42,7 @@
|
|||
</para>
|
||||
|
||||
<para>
|
||||
If the text is too small to be legible, try <command>setfont ter-132n</command>
|
||||
If the text is too small to be legible, try <command>setfont ter-v32n</command>
|
||||
to increase the font size.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
}
|
|
@ -497,8 +497,8 @@ if (-f $fb_modes_file && -r $fb_modes_file) {
|
|||
$modes =~ m/([0-9]+)x([0-9]+)/;
|
||||
my $console_width = $1, my $console_height = $2;
|
||||
if ($console_width > 1920) {
|
||||
push @attrs, "# High-DPI console";
|
||||
push @attrs, 'console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";';
|
||||
push @attrs, "# high-resolution display";
|
||||
push @attrs, 'hardware.video.hidpi.enable = lib.mkDefault true;';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue