diff options
author | nicoo <nicoo@mur.at> | 2023-09-09 08:21:59 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-09-09 08:21:59 +0000 |
commit | 150b2ff4d5307a33cb1b1bc8f13ca038a39bf645 (patch) | |
tree | d036c2a3377b98228a39dbb80c964a001ce42bd5 | |
parent | 6fdc291d5ae37d9e7de89f44eb28c4806e694d8b (diff) |
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.
-rw-r--r-- | nixos/modules/config/terminfo.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix index 403f2f3a3556..c0620c347f66 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 |