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:
parent
a5121f73e3
commit
74b3d66baf
2 changed files with 27 additions and 2 deletions
|
@ -1016,7 +1016,11 @@ services.transmission.settings.rpc-bind-address = "0.0.0.0";
|
||||||
<para>
|
<para>
|
||||||
Nginx module <literal>nginxModules.fastcgi-cache-purge</literal> renamed to official name <literal>nginxModules.cache-purge</literal>.
|
Nginx module <literal>nginxModules.fastcgi-cache-purge</literal> renamed to official name <literal>nginxModules.cache-purge</literal>.
|
||||||
Nginx module <literal>nginxModules.ngx_aws_auth</literal> renamed to official name <literal>nginxModules.aws-auth</literal>.
|
Nginx module <literal>nginxModules.ngx_aws_auth</literal> renamed to official name <literal>nginxModules.aws-auth</literal>.
|
||||||
The packages <package>perl</package>, <package>rsync</package> and <package>strace</package> were removed from <option>systemPackages</option>. If you need them, install them again with <code><xref linkend="opt-environment.systemPackages"/> = with pkgs; [ perl rsync strace ];</code> in your <filename>configuration.nix</filename>.
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The option <option>defaultPackages</option> was added. It installs the packages <package>perl</package>, <package>rsync</package> and <package>strace</package> for now. They were added unconditionally to <option>systemPackages</option> before, but are not strictly necessary for a minimal NixOS install. You can set it to an empty list to have a more minimal system. Be aware that some functionality might still have an impure dependency on those packages, so things might break.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -41,6 +41,12 @@ let
|
||||||
pkgs.zstd
|
pkgs.zstd
|
||||||
];
|
];
|
||||||
|
|
||||||
|
defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg)
|
||||||
|
[ pkgs.perl
|
||||||
|
pkgs.rsync
|
||||||
|
pkgs.strace
|
||||||
|
];
|
||||||
|
|
||||||
in
|
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 {
|
pathsToLink = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
# Note: We need `/lib' to be among `pathsToLink' for NSS modules
|
# Note: We need `/lib' to be among `pathsToLink' for NSS modules
|
||||||
|
@ -102,7 +123,7 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
environment.systemPackages = requiredPackages;
|
environment.systemPackages = requiredPackages ++ config.environment.defaultPackages;
|
||||||
|
|
||||||
environment.pathsToLink =
|
environment.pathsToLink =
|
||||||
[ "/bin"
|
[ "/bin"
|
||||||
|
|
Loading…
Reference in a new issue