diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 22:51:41 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:42:24 +0100 |
commit | 0eaf46a1dc961216016a886818ac2a66c14c74e6 (patch) | |
tree | d393a27009bbd1f4f183ff5d79852ff655e2a1cf /nixos/modules/config/system-path.nix | |
parent | 1060fefae3a3a56cc86acda6346efb9b1d854b31 (diff) | |
download | nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.tar nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.tar.gz nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.tar.bz2 nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.tar.lz nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.tar.xz nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.tar.zst nixpkgs-0eaf46a1dc961216016a886818ac2a66c14c74e6.zip |
nixos/system-path: add defaultText for defaultPackages
Diffstat (limited to 'nixos/modules/config/system-path.nix')
-rw-r--r-- | nixos/modules/config/system-path.nix | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index 6ff4ec2921c..875c4c9c441 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -41,12 +41,17 @@ let pkgs.zstd ]; - defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg) - [ pkgs.nano - pkgs.perl - pkgs.rsync - pkgs.strace - ]; + defaultPackageNames = + [ "nano" + "perl" + "rsync" + "strace" + ]; + defaultPackages = + map + (n: let pkg = pkgs.${n}; in setPrio ((pkg.meta.priority or 5) + 3) pkg) + defaultPackageNames; + defaultPackagesText = "[ ${concatMapStringsSep " " (n: "pkgs.${n}") defaultPackageNames } ]"; in @@ -73,6 +78,11 @@ in defaultPackages = mkOption { type = types.listOf types.package; default = defaultPackages; + defaultText = literalDocBook '' + these packages, with their <literal>meta.priority</literal> numerically increased + (thus lowering their installation priority): + <programlisting>${defaultPackagesText}</programlisting> + ''; example = []; description = '' Set of default packages that aren't strictly necessary |