Skip to content

Commit

Permalink
nixos/config: add defaultPackages option
Browse files Browse the repository at this point in the history
readd perl (used in shell scripts), rsync (needed for NixOps) and strace (common debugging tool)

they where previously removed in NixOS#91213

Co-authored-by: Timo Kaufmann <timokau@zoho.com>
Co-authored-by: 8573 <8573@users.noreply.github.com>
  • Loading branch information
3 people authored and Gabriella439 committed Sep 13, 2021
1 parent 8959968 commit 1fb44a8
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion nixos/modules/config/system-path.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ let
pkgs.which # 88K size
];

defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg)
[ pkgs.perl
pkgs.rsync
pkgs.strace
];

in

{
Expand All @@ -65,6 +71,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
Expand Down Expand Up @@ -104,7 +125,7 @@ in

config = {

environment.systemPackages = requiredPackages;
environment.systemPackages = requiredPackages ++ config.environment.defaultPackages;

environment.pathsToLink =
[ "/bin"
Expand Down

0 comments on commit 1fb44a8

Please sign in to comment.