Skip to content

Commit 7ce24f7

Browse files
authored
Merge pull request #1141 from NixOS/hidpi-fonts
only incrase font size for older kernel
2 parents 89fbccf + 8d839c1 commit 7ce24f7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

common/hidpi.nix

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
{ lib, pkgs, ... }:
1+
{
2+
lib,
3+
pkgs,
4+
config,
5+
...
6+
}:
7+
let
8+
# Starting with kernel 6.8, the console font is set in the kernel automatically to a 16x32 font:
9+
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfd19a5004eff03755967086aa04254c3d91b8ec
10+
oldKernel = lib.versionOlder config.boot.kernelPackages.kernel.version "6.8";
11+
in
212
{
313
# Just set the console font, don't mess with the font settings
4-
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
5-
console.earlySetup = lib.mkDefault true;
14+
console.font = lib.mkIf oldKernel (
15+
lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"
16+
);
17+
console.earlySetup = lib.mkIf oldKernel (lib.mkDefault true);
618
}

0 commit comments

Comments
 (0)