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:
co-authored by
Timo Kaufmann
8573
parent
a5121f73e3
commit
74b3d66baf
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user