nixos/terminfo: Improve snippet generating the “all terminfo” list

- 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.
This commit is contained in:
nicoo 2023-09-09 08:21:59 +00:00
parent 6fdc291d5a
commit 150b2ff4d5

View file

@ -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