Skip to content

Commit

Permalink
Merge #135477: branch 'staging-next'
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Sep 15, 2021
2 parents 42e3350 + 5663f46 commit ff94eef
Show file tree
Hide file tree
Showing 642 changed files with 6,492 additions and 4,096 deletions.
6 changes: 3 additions & 3 deletions doc/builders/packages/linux.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ How to add a new (major) version of the Linux kernel to Nixpkgs:

1. Copy the old Nix expression (e.g. `linux-2.6.21.nix`) to the new one (e.g. `linux-2.6.22.nix`) and update it.

2. Add the new kernel to `all-packages.nix` (e.g., create an attribute `kernel_2_6_22`).
2. Add the new kernel to the `kernels` attribute set in `linux-kernels.nix` (e.g., create an attribute `kernel_2_6_22`).

3. Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (`i686`, `x86_64`, `uml`) do the following:

Expand All @@ -36,6 +36,6 @@ How to add a new (major) version of the Linux kernel to Nixpkgs:

5. Copy `.config` over the new config file (e.g. `config-2.6.22-i686-smp`).

4. Test building the kernel: `nix-build -A kernel_2_6_22`. If it compiles, ship it! For extra credit, try booting NixOS with it.
4. Test building the kernel: `nix-build -A linuxKernel.kernels.kernel_2_6_22`. If it compiles, ship it! For extra credit, try booting NixOS with it.

5. It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the `linuxPackagesFor` function in `all-packages.nix` (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
5. It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the `linuxPackagesFor` function in `linux-kernels.nix` (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
37 changes: 21 additions & 16 deletions nixos/doc/manual/configuration/linux-kernel.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ option `boot.kernelPackages`. For instance, this selects the Linux 3.10
kernel:

```nix
boot.kernelPackages = pkgs.linuxPackages_3_10;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
```

Note that this not only replaces the kernel, but also packages that are
specific to the kernel version, such as the NVIDIA video drivers. This
ensures that driver packages are consistent with the kernel.

While `pkgs.linuxKernel.packages` contains all available kernel packages,
you may want to use one of the unversioned `pkgs.linuxPackages_*` aliases
such as `pkgs.linuxPackages_latest`, that are kept up to date with new
versions.

The default Linux kernel configuration should be fine for most users.
You can see the configuration of your current kernel with the following
command:
Expand All @@ -25,14 +30,13 @@ If you want to change the kernel configuration, you can use the
instance, to enable support for the kernel debugger KGDB:

```nix
nixpkgs.config.packageOverrides = pkgs:
{ linux_3_4 = pkgs.linux_3_4.override {
extraConfig =
''
KGDB y
'';
};
nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs {
linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override {
extraConfig = ''
KGDB y
'';
};
};
```

`extraConfig` takes a list of Linux kernel configuration options, one
Expand Down Expand Up @@ -72,16 +76,17 @@ available parameters, run `sysctl -a`.

The first step before compiling the kernel is to generate an appropriate
`.config` configuration. Either you pass your own config via the
`configfile` setting of `linuxManualConfig`:
`configfile` setting of `linuxKernel.manualConfig`:

```nix
custom-kernel = super.linuxManualConfig {
inherit (super) stdenv hostPlatform;
inherit (linux_4_9) src;
version = "${linux_4_9.version}-custom";
configfile = /home/me/my_kernel_config;
allowImportFromDerivation = true;
custom-kernel = let base_kernel = linuxKernel.kernels.linux_4_9;
in super.linuxKernel.manualConfig {
inherit (super) stdenv hostPlatform;
inherit (base_kernel) src;
version = "${base_kernel.version}-custom";
configfile = /home/me/my_kernel_config;
allowImportFromDerivation = true;
};
```

Expand Down
37 changes: 22 additions & 15 deletions nixos/doc/manual/from_md/configuration/linux-kernel.chapter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
selects the Linux 3.10 kernel:
</para>
<programlisting language="bash">
boot.kernelPackages = pkgs.linuxPackages_3_10;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
</programlisting>
<para>
Note that this not only replaces the kernel, but also packages that
are specific to the kernel version, such as the NVIDIA video
drivers. This ensures that driver packages are consistent with the
kernel.
</para>
<para>
While <literal>pkgs.linuxKernel.packages</literal> contains all
available kernel packages, you may want to use one of the
unversioned <literal>pkgs.linuxPackages_*</literal> aliases such as
<literal>pkgs.linuxPackages_latest</literal>, that are kept up to
date with new versions.
</para>
<para>
The default Linux kernel configuration should be fine for most
users. You can see the configuration of your current kernel with the
Expand All @@ -29,14 +36,13 @@ zcat /proc/config.gz
enable support for the kernel debugger KGDB:
</para>
<programlisting language="bash">
nixpkgs.config.packageOverrides = pkgs:
{ linux_3_4 = pkgs.linux_3_4.override {
extraConfig =
''
KGDB y
'';
};
nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs {
linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override {
extraConfig = ''
KGDB y
'';
};
};
</programlisting>
<para>
<literal>extraConfig</literal> takes a list of Linux kernel
Expand Down Expand Up @@ -82,16 +88,17 @@ boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 120;
The first step before compiling the kernel is to generate an
appropriate <literal>.config</literal> configuration. Either you
pass your own config via the <literal>configfile</literal> setting
of <literal>linuxManualConfig</literal>:
of <literal>linuxKernel.manualConfig</literal>:
</para>
<programlisting language="bash">
custom-kernel = super.linuxManualConfig {
inherit (super) stdenv hostPlatform;
inherit (linux_4_9) src;
version = &quot;${linux_4_9.version}-custom&quot;;
custom-kernel = let base_kernel = linuxKernel.kernels.linux_4_9;
in super.linuxKernel.manualConfig {
inherit (super) stdenv hostPlatform;
inherit (base_kernel) src;
version = &quot;${base_kernel.version}-custom&quot;;

configfile = /home/me/my_kernel_config;
allowImportFromDerivation = true;
configfile = /home/me/my_kernel_config;
allowImportFromDerivation = true;
};
</programlisting>
<para>
Expand Down
32 changes: 32 additions & 0 deletions nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,20 @@ Superuser created successfully.
<section xml:id="sec-release-21.11-notable-changes">
<title>Other Notable Changes</title>
<itemizedlist>
<listitem>
<para>
The linux kernel package infrastructure was moved out of
<literal>all-packages.nix</literal>, and restructured. Linux
related functions and attributes now live under the
<literal>pkgs.linuxKernel</literal> attribute set. In
particular the versioned <literal>linuxPackages_*</literal>
package sets (such as <literal>linuxPackages_5_4</literal>)
and kernels from <literal>pkgs</literal> were moved there and
now live under <literal>pkgs.linuxKernel.packages.*</literal>.
The unversioned ones (such as
<literal>linuxPackages_latest</literal>) remain untouched.
</para>
</listitem>
<listitem>
<para>
The setting
Expand Down Expand Up @@ -1171,6 +1185,24 @@ Superuser created successfully.
but instead use more of the YAML-specific syntax.
</para>
</listitem>
<listitem>
<para>
MariaDB was upgraded from 10.5.x to 10.6.x. Please read the
<link xlink:href="https://mariadb.com/kb/en/changes-improvements-in-mariadb-106/">upstream
release notes</link> for changes and upgrade instructions.
</para>
</listitem>
<listitem>
<para>
The MariaDB C client library, also known as libmysqlclient or
mariadb-connector-c, was upgraded from 3.1.x to 3.2.x. While
this should hopefully not have any impact, this upgrade comes
with some changes to default behavior, so you might want to
review the
<link xlink:href="https://mariadb.com/kb/en/changes-and-improvements-in-mariadb-connector-c-32/">upstream
release notes</link>.
</para>
</listitem>
<listitem>
<para>
GNOME desktop environment now enables
Expand Down
7 changes: 7 additions & 0 deletions nixos/doc/manual/release-notes/rl-2111.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ To be able to access the web UI this port needs to be opened in the firewall.

## Other Notable Changes {#sec-release-21.11-notable-changes}

- The linux kernel package infrastructure was moved out of `all-packages.nix`, and restructured. Linux related functions and attributes now live under the `pkgs.linuxKernel` attribute set.
In particular the versioned `linuxPackages_*` package sets (such as `linuxPackages_5_4`) and kernels from `pkgs` were moved there and now live under `pkgs.linuxKernel.packages.*`. The unversioned ones (such as `linuxPackages_latest`) remain untouched.

- The setting [`services.openssh.logLevel`](options.html#opt-services.openssh.logLevel) `"VERBOSE"` `"INFO"`. This brings NixOS in line with upstream and other Linux distributions, and reduces log spam on servers due to bruteforcing botnets.

However, if [`services.fail2ban.enable`](options.html#opt-services.fail2ban.enable) is `true`, the `fail2ban` will override the verbosity to `"VERBOSE"`, so that `fail2ban` can observe the failed login attempts from the SSH logs.
Expand Down Expand Up @@ -352,6 +355,10 @@ To be able to access the web UI this port needs to be opened in the firewall.

- `lib.formats.yaml`'s `generate` will not generate JSON anymore, but instead use more of the YAML-specific syntax.

- MariaDB was upgraded from 10.5.x to 10.6.x. Please read the [upstream release notes](https://mariadb.com/kb/en/changes-improvements-in-mariadb-106/) for changes and upgrade instructions.

- The MariaDB C client library, also known as libmysqlclient or mariadb-connector-c, was upgraded from 3.1.x to 3.2.x. While this should hopefully not have any impact, this upgrade comes with some changes to default behavior, so you might want to review the [upstream release notes](https://mariadb.com/kb/en/changes-and-improvements-in-mariadb-connector-c-32/).

- GNOME desktop environment now enables `QGnomePlatform` as the Qt platform theme, which should avoid crashes when opening file chooser dialogs in Qt apps by using XDG desktop portal. Additionally, it will make the apps fit better visually.

- `rofi` has been updated from '1.6.1' to '1.7.0', one important thing is the removal of the old xresources based configuration setup. Read more [in rofi's changelog](https://github.com/davatorium/rofi/blob/cb12e6fc058f4a0f4f/Changelog#L1).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ in
boot.initrd.availableKernelModules =
[ "vfat" "reiserfs" ];

boot.kernelPackages = pkgs.linuxPackages_3_10;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
boot.kernelParams = [ "console=tty1" ];

boot.postBootCommands =
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/installer/cd-dvd/system-tarball-pc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ in
# To be able to use the systemTarball to catch troubles.
boot.crashDump = {
enable = true;
kernelPackages = pkgs.linuxPackages_3_4;
kernelPackages = pkgs.linuxKernel.packages.linux_3_4;
};

# No grub for the tarball.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ in
# "console=ttyS0,115200n8" # serial console
];

boot.kernelPackages = pkgs.linuxPackages_3_4;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_4;

boot.supportedFilesystems = [ "reiserfs" ];

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/installer/sd-card/sd-image-raspberrypi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
boot.loader.generic-extlinux-compatible.enable = true;

boot.consoleLogLevel = lib.mkDefault 7;
boot.kernelPackages = pkgs.linuxPackages_rpi1;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_rpi1;

sdImage = {
populateFirmwareCommands = let
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/backup/automysqlbackup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ in
services.automysqlbackup.config = mapAttrs (name: mkDefault) {
mysql_dump_username = user;
mysql_dump_host = "localhost";
mysql_dump_socket = "/run/mysqld/mysqld.sock";
backup_dir = "/var/backup/mysql";
db_exclude = [ "information_schema" "performance_schema" ];
mailcontent = "stdout";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/system/boot/kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ in
# We don't want to evaluate all of linuxPackages for the manual
# - some of it might not even evaluate correctly.
defaultText = "pkgs.linuxPackages";
example = literalExample "pkgs.linuxPackages_2_6_25";
example = literalExample "pkgs.linuxKernel.packages.linux_5_10";
description = ''
This option allows you to override the Linux kernel used by
NixOS. Since things like external kernel module packages are
Expand Down
18 changes: 7 additions & 11 deletions pkgs/applications/blockchains/chia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ let chia = python3Packages.buildPythonApplication rec {
})
];

postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
ln -sf ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';

nativeBuildInputs = [
python3Packages.setuptools-scm
];
Expand Down Expand Up @@ -75,17 +82,6 @@ let chia = python3Packages.buildPythonApplication rec {
"test_using_legacy_keyring"
];

postPatch = ''
# tweak version requirements to what's available in Nixpkgs
substituteInPlace setup.py \
--replace "aiohttp==3.7.4" "aiohttp>=3.7.4" \
--replace "sortedcontainers==2.3.0" "sortedcontainers>=2.3.0" \
--replace "click==7.1.2" "click>=7.1.2" \
--replace "clvm==0.9.7" "clvm>=0.9.7" \
ln -sf ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';

preCheck = ''
export HOME=`mktemp -d`
'';
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vim/common.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "8.2.2567";
version = "8.2.3337";

src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
sha256 = "sha256-FS3TZX7FKnnNpGYKbng2LIfWA9z2jqg7d2HC6t3xYTU=";
sha256 = "sha256-iwSGcLeqXH0bVIXEI5OnotG88Uv8ntycisD9EcHjz/c=";
};

enableParallelBuilding = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/graphics/krita/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

mkDerivation rec {
pname = "krita";
version = "4.4.5";
version = "4.4.7";

src = fetchurl {
url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-S/1ygIcNEGCgDREj2Db8Gltb+KAoZ2Z58CaM1ef7dWg=";
sha256 = "sha256-I6fFxPRCcRU5dyFXZPvGvTb9MuGikrvTaGCXpp4LRRk=";
};

nativeBuildInputs = [ cmake extra-cmake-modules python3Packages.sip_4 makeWrapper ];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/kde/akonadi-contacts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
extra-cmake-modules,
qtwebengine,
grantlee, grantleetheme,
kdbusaddons, ki18n, kiconthemes, kio, kitemmodels, ktextwidgets, prison,
akonadi, akonadi-mime, kcontacts, kmime, libkleo,
kcmutils, kdbusaddons, ki18n, kiconthemes, kio, kitemmodels, ktextwidgets,
prison, akonadi, akonadi-mime, kcontacts, kmime, libkleo,
}:

mkDerivation {
Expand All @@ -17,7 +17,7 @@ mkDerivation {
buildInputs = [
qtwebengine
grantlee grantleetheme
kdbusaddons ki18n kiconthemes kio kitemmodels ktextwidgets prison
kcmutils kdbusaddons ki18n kiconthemes kio kitemmodels ktextwidgets prison
akonadi-mime kcontacts kmime libkleo
];
propagatedBuildInputs = [ akonadi ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/kde/fetch.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
WGET_ARGS=( http://download.kde.org/stable/release-service/21.04.0/src -A '*.tar.xz' )
WGET_ARGS=( http://download.kde.org/stable/release-service/21.08.0/src -A '*.tar.xz' )
6 changes: 6 additions & 0 deletions pkgs/applications/kde/kdeconnect-kde.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@
, makeWrapper
, pulseaudio-qt
, qca-qt5
, qqc2-desktop-style
, qtgraphicaleffects
, qtmultimedia
, qtquickcontrols2
, qtx11extras
, breeze-icons
, sshfs
, wayland
, wayland-scanner
}:

mkDerivation {
Expand All @@ -46,10 +49,13 @@ mkDerivation {
libfakekey
pulseaudio-qt
qca-qt5
qqc2-desktop-style
qtgraphicaleffects
qtmultimedia
qtquickcontrols2
qtx11extras
wayland
wayland-scanner
# otherwise buttons are blank on non-kde
breeze-icons
];
Expand Down
Loading

0 comments on commit ff94eef

Please sign in to comment.