1 # This module manages the terminfo database
2 # and its integration in the system.
3 { config, lib, pkgs, ... }:
9 options.environment.enableAllTerminfo = with lib; mkOption {
12 description = lib.mdDoc ''
13 Whether to install all terminfo outputs
19 # can be generated with: filter (drv: (builtins.tryEval (drv ? terminfo)).value) (attrValues pkgs)
20 environment.systemPackages = mkIf config.environment.enableAllTerminfo (map (x: x.terminfo) (with pkgs; [
25 rxvt-unicode-unwrapped
26 rxvt-unicode-unwrapped-emoji
31 environment.pathsToLink = [
35 environment.etc.terminfo = {
36 source = "${config.system.path}/share/terminfo";
39 environment.profileRelativeSessionVariables = {
40 TERMINFO_DIRS = [ "/share/terminfo" ];
43 environment.extraInit = ''
45 # reset TERM with new TERMINFO available (if any)
49 security.sudo.extraConfig = ''
51 # Keep terminfo database for root and %wheel.
52 Defaults:root,%wheel env_keep+=TERMINFO_DIRS
53 Defaults:root,%wheel env_keep+=TERMINFO