nixos/environment.terminfo: remove with lib;
This commit is contained in:
parent
d666633846
commit
6232911ef5
@ -1,23 +1,20 @@
|
||||
# This module manages the terminfo database
|
||||
# and its integration in the system.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
options = with lib; {
|
||||
environment.enableAllTerminfo = mkOption {
|
||||
environment.enableAllTerminfo = lib.mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Whether to install all terminfo outputs
|
||||
'';
|
||||
};
|
||||
|
||||
security.sudo.keepTerminfo = mkOption {
|
||||
security.sudo.keepTerminfo = lib.mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Whether to preserve the `TERMINFO` and `TERMINFO_DIRS`
|
||||
environment variables, for `root` and the `wheel` group.
|
||||
@ -28,10 +25,10 @@ with lib;
|
||||
config = {
|
||||
|
||||
# can be generated with:
|
||||
# attrNames (filterAttrs
|
||||
# (_: drv: (builtins.tryEval (isDerivation drv && drv ? terminfo)).value)
|
||||
# lib.attrNames (lib.filterAttrs
|
||||
# (_: drv: (builtins.tryEval (lib.isDerivation drv && drv ? terminfo)).value)
|
||||
# pkgs)
|
||||
environment.systemPackages = mkIf config.environment.enableAllTerminfo (map (x: x.terminfo) (with pkgs.pkgsBuildBuild; [
|
||||
environment.systemPackages = lib.mkIf config.environment.enableAllTerminfo (map (x: x.terminfo) (with pkgs.pkgsBuildBuild; [
|
||||
alacritty
|
||||
contour
|
||||
foot
|
||||
@ -65,7 +62,7 @@ with lib;
|
||||
export TERM=$TERM
|
||||
'';
|
||||
|
||||
security.sudo.extraConfig = mkIf config.security.sudo.keepTerminfo ''
|
||||
security.sudo.extraConfig = lib.mkIf config.security.sudo.keepTerminfo ''
|
||||
|
||||
# Keep terminfo database for root and %wheel.
|
||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||
|
Loading…
Reference in New Issue
Block a user