Merge pull request #97565 from samuelgrf/defaultPackages-nano

nixos/config: move nano to defaultPackages
This commit is contained in:
davidak 2021-03-31 09:17:56 +02:00 committed by GitHub
commit fe3eb35133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 6 deletions

View File

@ -625,6 +625,15 @@ environment.systemPackages = [
</programlisting> </programlisting>
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<option>environment.defaultPackages</option> now includes the nano package.
If <package>pkgs.nano</package> is not added to the list,
make sure another editor is installed and the <literal>EDITOR</literal>
environment variable is set to it.
Environment variables can be set using <option>environment.variables</option>.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -29,7 +29,6 @@ let
pkgs.xz pkgs.xz
pkgs.less pkgs.less
pkgs.libcap pkgs.libcap
pkgs.nano
pkgs.ncurses pkgs.ncurses
pkgs.netcat pkgs.netcat
config.programs.ssh.package config.programs.ssh.package
@ -43,7 +42,8 @@ let
]; ];
defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg) defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg)
[ pkgs.perl [ pkgs.nano
pkgs.perl
pkgs.rsync pkgs.rsync
pkgs.strace pkgs.strace
]; ];
@ -75,13 +75,21 @@ in
default = defaultPackages; default = defaultPackages;
example = literalExample "[]"; example = literalExample "[]";
description = '' description = ''
Set of packages users expect from a minimal linux istall. Set of default packages that aren't strictly neccessary
Like systemPackages, they appear in for a running system, entries can be removed for a more
/run/current-system/sw. These packages are minimal NixOS installation.
Note: If <package>pkgs.nano</package> is removed from this list,
make sure another editor is installed and the
<literal>EDITOR</literal> environment variable is set to it.
Environment variables can be set using
<option>environment.variables</option>.
Like with systemPackages, packages are installed to
<filename>/run/current-system/sw</filename>. They are
automatically available to all users, and are automatically available to all users, and are
automatically updated every time you rebuild the system automatically updated every time you rebuild the system
configuration. configuration.
If you want a more minimal system, set it to an empty list.
''; '';
}; };