diff options
author | WORLDofPEACE <worldofpeace@protonmail.ch> | 2020-09-08 19:40:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 19:40:45 -0400 |
commit | 2ab42dcc9e228861cec54ab346e01c9ab6e34771 (patch) | |
tree | 25811aea794ac713475a8810a3873b2ba1dfbf83 /nixos/modules/config | |
parent | d85c02ba20442e77fe6a1f685e08b0fd05f2c9bb (diff) | |
parent | 74b3d66baf2f3effb4702832fc45828291a358d8 (diff) |
Merge pull request #97171 from davidak/defaultPackages
nixos/config: add defaultPackages option
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/system-path.nix | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index b3c5c6f93f368..67305e8499cb5 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -41,6 +41,12 @@ let pkgs.zstd ]; + defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg) + [ pkgs.perl + pkgs.rsync + pkgs.strace + ]; + in { @@ -63,6 +69,21 @@ in ''; }; + defaultPackages = mkOption { + type = types.listOf types.package; + default = defaultPackages; + example = literalExample "[]"; + description = '' + Set of packages users expect from a minimal linux istall. + Like systemPackages, they appear in + /run/current-system/sw. These packages are + automatically available to all users, and are + automatically updated every time you rebuild the system + configuration. + If you want a more minimal system, set it to an empty list. + ''; + }; + pathsToLink = mkOption { type = types.listOf types.str; # Note: We need `/lib' to be among `pathsToLink' for NSS modules @@ -102,7 +123,7 @@ in config = { - environment.systemPackages = requiredPackages; + environment.systemPackages = requiredPackages ++ config.environment.defaultPackages; environment.pathsToLink = [ "/bin" |