From 6232911ef50fa5372ab2515a4d6b8a1ce67c1900 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 27 Aug 2024 20:42:49 +0200 Subject: [PATCH] nixos/environment.terminfo: remove `with lib;` --- nixos/modules/config/terminfo.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix index b538d749ffcb..bf8bc43d6bb5 100644 --- a/nixos/modules/config/terminfo.nix +++ b/nixos/modules/config/terminfo.nix @@ -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