diff options
author | davidak <git@davidak.de> | 2020-09-05 02:12:43 +0200 |
---|---|---|
committer | davidak <git@davidak.de> | 2020-09-06 18:58:20 +0200 |
commit | 74b3d66baf2f3effb4702832fc45828291a358d8 (patch) | |
tree | f04f43e873ab1d5c1d70d130792dd8f19d40e3a6 /nixos/modules/config | |
parent | a5121f73e3f89556d33e7b1fc9c6d70673b20458 (diff) |
nixos/config: add defaultPackages option
readd perl (used in shell scripts), rsync (needed for NixOps) and strace (common debugging tool) they where previously removed in https://github.com/NixOS/nixpkgs/pull/91213 Co-authored-by: Timo Kaufmann <timokau@zoho.com> Co-authored-by: 8573 <8573@users.noreply.github.com>
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" |