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 /nixos/modules/config | |
parent | 6fdc291d5ae37d9e7de89f44eb28c4806e694d8b (diff) | |
download | nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.tar nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.tar.gz nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.tar.bz2 nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.tar.lz nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.tar.xz nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.tar.zst nixpkgs-150b2ff4d5307a33cb1b1bc8f13ca038a39bf645.zip |
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.
Diffstat (limited to 'nixos/modules/config')
-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 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 |