From 150b2ff4d5307a33cb1b1bc8f13ca038a39bf645 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 9 Sep 2023 08:21:59 +0000 Subject: nixos/terminfo: Improve snippet generating the “all terminfo” list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Avoid false-positives on package sets that contain a `terminfo` derivation, like `haskellPackages` and `sbclPackages`. - Directly provide a list of names that can be used to update the NixOS module, rather than a list of derivations which is hard to read in the REPL. --- nixos/modules/config/terminfo.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nixos/modules/config') diff --git a/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix index 403f2f3a355..c0620c347f6 100644 --- a/nixos/modules/config/terminfo.nix +++ b/nixos/modules/config/terminfo.nix @@ -16,7 +16,10 @@ with lib; config = { - # can be generated with: filter (drv: (builtins.tryEval (drv ? terminfo)).value) (attrValues pkgs) + # can be generated with: + # attrNames (filterAttrs + # (_: drv: (builtins.tryEval (isDerivation drv && drv ? terminfo)).value) + # pkgs) environment.systemPackages = mkIf config.environment.enableAllTerminfo (map (x: x.terminfo) (with pkgs; [ alacritty foot -- cgit 1.4.1