1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-23 11:29:42 +01:00

Merge pull request #1141 from NixOS/hidpi-fonts

only incrase font size for older kernel
This commit is contained in:
Jörg Thalheim 2024-09-27 13:04:54 +02:00 committed by GitHub
commit 7ce24f7590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,18 @@
{ lib, pkgs, ... }: {
lib,
pkgs,
config,
...
}:
let
# Starting with kernel 6.8, the console font is set in the kernel automatically to a 16x32 font:
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfd19a5004eff03755967086aa04254c3d91b8ec
oldKernel = lib.versionOlder config.boot.kernelPackages.kernel.version "6.8";
in
{ {
# Just set the console font, don't mess with the font settings # Just set the console font, don't mess with the font settings
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"; console.font = lib.mkIf oldKernel (
console.earlySetup = lib.mkDefault true; lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"
);
console.earlySetup = lib.mkIf oldKernel (lib.mkDefault true);
} }