diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-07-05 08:55:26 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-07-05 08:55:26 +0200 |
commit | 5328aac7be5b7ebf794349f915a379efd04b018b (patch) | |
tree | 029547f7673a785c42f12770a68a3ec31a297bf9 /nixos/modules | |
parent | f203b32bb8e824a75f89fd9805680b4a8e92d2a5 (diff) | |
parent | c73f0caea5f0822ea044b4f90de4b64706d91362 (diff) | |
download | nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.tar nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.tar.gz nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.tar.bz2 nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.tar.lz nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.tar.xz nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.tar.zst nixlib-5328aac7be5b7ebf794349f915a379efd04b018b.zip |
Merge branch 'staging'
Comparison looks OK; I'll try some fixes on master directly. http://hydra.nixos.org/eval/1372577?compare=1372497
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/config/system-path.nix | 1 | ||||
-rw-r--r-- | nixos/modules/config/terminfo.nix | 33 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/environment.nix | 4 | ||||
-rw-r--r-- | nixos/modules/security/sudo.nix | 4 | ||||
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 2 |
6 files changed, 35 insertions, 10 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index 3ac5f634c7a6..cf3cc2f22628 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -115,7 +115,6 @@ in "/share/mime" "/share/nano" "/share/org" - "/share/terminfo" "/share/themes" "/share/vim-plugins" "/share/vulkan" diff --git a/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix new file mode 100644 index 000000000000..4fd6ba5ea605 --- /dev/null +++ b/nixos/modules/config/terminfo.nix @@ -0,0 +1,33 @@ +# 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 + ''; + + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 1f6b7caba81f..a2add1b3e435 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -21,6 +21,7 @@ ./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 diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix index ba356a8ad2dd..401d152941a0 100644 --- a/nixos/modules/programs/environment.nix +++ b/nixos/modules/programs/environment.nix @@ -34,7 +34,6 @@ in { 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/" ]; @@ -50,9 +49,6 @@ in 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 diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix index 67a9b9a45ee3..cfd0595e63b7 100644 --- a/nixos/modules/security/sudo.nix +++ b/nixos/modules/security/sudo.nix @@ -66,10 +66,6 @@ in # 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 diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 73608a0e27f2..02870878c0f3 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -135,7 +135,7 @@ let $out/bin/ash -c 'echo hello world' | grep "hello world" export LD_LIBRARY_PATH=$out/lib $out/bin/mount --help 2>&1 | grep -q "BusyBox" - $out/bin/blkid --help 2>&1 | grep -q 'libblkid' + $out/bin/blkid -V 2>&1 | grep -q 'libblkid' $out/bin/udevadm --version $out/bin/dmsetup --version 2>&1 | tee -a log | grep -q "version:" LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep -q "LVM" |