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>
This commit is contained in:
davidak
2020-09-06 18:58:20 +02:00
co-authored by Timo Kaufmann 8573
parent a5121f73e3
commit 74b3d66baf
2 changed files with 27 additions and 2 deletions
+22 -1
View File
@@ -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"