From facf33615e8996fcf94e3d30caa5dfae3a8a0456 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 2 Oct 2026 22:56:12 +0800 Subject: [PATCH] fix(nixos): install terminfo only for terminals in use environment.enableAllTerminfo installs every terminal's terminfo, including rxvt-unicode, which no longer builds with GCC 16 (NixOS/nixpkgs#568896). Install just the terminals we use (alacritty, foot, ghostty, kitty) instead. This also makes the aarch64 jasper workaround unnecessary. --- modules/nixos/base/ssh.nix | 14 +++++++++++--- modules/nixos/server/server-aarch64.nix | 4 ---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/nixos/base/ssh.nix b/modules/nixos/base/ssh.nix index 73ab92f4..303175bb 100644 --- a/modules/nixos/base/ssh.nix +++ b/modules/nixos/base/ssh.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: { # Secure by default: firewall ON everywhere. Servers run the same shared # firewall (modules/nixos/base/networking/firewall.nix) as every other host, @@ -18,7 +18,15 @@ openFirewall = true; }; - # Add terminfo database of all known terminals to the system profile. + # Terminfo entries for the terminals we actually use, so `$TERM` resolves on + # hosts we SSH into. This replaces `environment.enableAllTerminfo`, which + # installs every terminal's terminfo — including rxvt-unicode, which currently + # fails to build with GCC 16 (https://github.com/NixOS/nixpkgs/issues/568896). # https://github.com/NixOS/nixpkgs/blob/nixos-26.05/nixos/modules/config/terminfo.nix - environment.enableAllTerminfo = true; + environment.systemPackages = [ + pkgs.alacritty.terminfo + pkgs.foot.terminfo + pkgs.ghostty.terminfo + pkgs.kitty.terminfo + ]; } diff --git a/modules/nixos/server/server-aarch64.nix b/modules/nixos/server/server-aarch64.nix index 1e7abec8..f42d20f6 100644 --- a/modules/nixos/server/server-aarch64.nix +++ b/modules/nixos/server/server-aarch64.nix @@ -1,6 +1,4 @@ { - lib, - pkgs, mylib, ... }: @@ -26,6 +24,4 @@ (mylib.relativeToRoot "hardening/apparmor") ]; - # Fix: jasper is marked as broken, refusing to evaluate. - environment.enableAllTerminfo = lib.mkForce false; }