terminfo: symlink terminfo to /etc for ncurses

Changed files
+34 -9
nixos
-1
nixos/modules/config/system-path.nix
···
"/share/mime"
"/share/nano"
"/share/org"
-
"/share/terminfo"
"/share/themes"
"/share/vim-plugins"
"/share/vulkan"
+33
nixos/modules/config/terminfo.nix
···
+
# This module manages the terminfo database
+
# and its integration in the system.
+
{ config, ... }:
+
{
+
config = {
+
+
environment.pathsToLink = [
+
"/share/terminfo"
+
];
+
+
environment.etc."terminfo" = {
+
source = "${config.system.path}/share/terminfo";
+
};
+
+
environment.profileRelativeEnvVars = {
+
TERMINFO_DIRS = [ "/share/terminfo" ];
+
};
+
+
environment.extraInit = ''
+
+
# reset TERM with new TERMINFO available (if any)
+
export TERM=$TERM
+
'';
+
+
security.sudo.extraConfig = ''
+
+
# Keep terminfo database for root and %wheel.
+
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
+
Defaults:root,%wheel env_keep+=TERMINFO
+
'';
+
+
};
+
}
+1
nixos/modules/module-list.nix
···
./config/sysctl.nix
./config/system-environment.nix
./config/system-path.nix
+
./config/terminfo.nix
./config/timezone.nix
./config/unix-odbc-drivers.nix
./config/users-groups.nix
-4
nixos/modules/programs/environment.nix
···
{ PATH = [ "/bin" ];
INFOPATH = [ "/info" "/share/info" ];
PKG_CONFIG_PATH = [ "/lib/pkgconfig" ];
-
TERMINFO_DIRS = [ "/share/terminfo" ];
PERL5LIB = [ "/lib/perl5/site_perl" ];
KDEDIRS = [ "" ];
STRIGI_PLUGIN_PATH = [ "/lib/strigi/" ];
···
environment.extraInit =
''
-
# reset TERM with new TERMINFO available (if any)
-
export TERM=$TERM
-
unset ASPELL_CONF
for i in ${concatStringsSep " " (reverseList cfg.profiles)} ; do
if [ -d "$i/lib/aspell" ]; then
-4
nixos/modules/security/sudo.nix
···
# Don't edit this file. Set the NixOS options ‘security.sudo.configFile’
# or ‘security.sudo.extraConfig’ instead.
-
# Environment variables to keep for root and %wheel.
-
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
-
Defaults:root,%wheel env_keep+=TERMINFO
-
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
Defaults env_keep+=SSH_AUTH_SOCK