From 47b699fe6c417b77575eff93be4b21a8530cf9be Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 16 Mar 2022 14:47:45 +0100 Subject: [PATCH 1/2] Revert "nixos/modprobe: add boot.initrd.extraModprobeConfig option" This reverts commit 1c58cdbeed880e99d816c234a954d4cdfc073b6c, since this change was made redundant by 3dc6fab5c9362db2cf079ffa15f2b62b05001747 and in https://github.com/NixOS/nixpkgs/pull/145013 we decided to revert this commit. --- .../from_md/release-notes/rl-2205.section.xml | 8 -------- .../manual/release-notes/rl-2205.section.md | 2 -- nixos/modules/system/boot/modprobe.nix | 20 ------------------- nixos/modules/system/boot/stage-1.nix | 3 --- 4 files changed, 33 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index d91bad8042dc..cb88db67235f 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -1317,14 +1317,6 @@ files. - - - A new option - boot.initrd.extraModprobeConfig has been - added which can be used to configure kernel modules that are - loaded in the initrd. - - nixos-generate-config now puts the dhcp diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 2e01297f15fa..27cca7158e03 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -491,8 +491,6 @@ In addition to numerous new and upgraded packages, this release has the followin - The option `services.duplicati.dataDir` has been added to allow changing the location of duplicati's files. -- A new option `boot.initrd.extraModprobeConfig` has been added which can be used to configure kernel modules that are loaded in the initrd. - - `nixos-generate-config` now puts the dhcp configuration in `hardware-configuration.nix` instead of `configuration.nix`. - ORY Kratos was updated to version 0.8.3-alpha.1.pre.0, which introduces some breaking changes: diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix index 27f78835adb2..e683d1817297 100644 --- a/nixos/modules/system/boot/modprobe.nix +++ b/nixos/modules/system/boot/modprobe.nix @@ -34,23 +34,6 @@ with lib; type = types.lines; }; - boot.initrd.extraModprobeConfig = mkOption { - default = ""; - example = - '' - options zfs zfs_arc_max=1073741824 - ''; - description = '' - Does exactly the same thing as - , except - that the generated modprobe.conf - file is also included in the initrd. - This is useful for setting module options for kernel - modules that are loaded during early boot in the initrd. - ''; - type = types.lines; - }; - }; @@ -67,9 +50,6 @@ with lib; '')} ${config.boot.extraModprobeConfig} ''; - environment.etc."modprobe.d/nixos-initrd.conf".text = '' - ${config.boot.initrd.extraModprobeConfig} - ''; environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; environment.etc."modprobe.d/systemd.conf".source = "${pkgs.systemd}/lib/modprobe.d/systemd.conf"; diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index a85a3675e03e..8b011d91563f 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -338,9 +338,6 @@ let { object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf; symlink = "/etc/mdadm.conf"; } - { object = config.environment.etc."modprobe.d/nixos-initrd.conf".source; - symlink = "/etc/modprobe.d/nixos-initrd.conf"; - } { object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu" { src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; preferLocalBuild = true; From 7867b9506b76d5d1e71419c1b259c0990afff081 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 17 Mar 2022 10:17:51 +0100 Subject: [PATCH 2/2] nixos/doc/rl-22.05: add changelog entry for modprobe changes Add a changelog entry for the changes in 3dc6fab5c9362db2cf079ffa15f2b62b05001747. --- .../doc/manual/from_md/release-notes/rl-2205.section.xml | 8 ++++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 2 ++ 2 files changed, 10 insertions(+) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index cb88db67235f..7ef03b1f5e1c 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -1317,6 +1317,14 @@ files. + + + The options boot.extraModprobeConfig and + boot.blacklistedKernelModules now also take + effect in the initrd by copying the file + /etc/modprobe.d/nixos.conf into the initrd. + + nixos-generate-config now puts the dhcp diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 27cca7158e03..d592d6896116 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -491,6 +491,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The option `services.duplicati.dataDir` has been added to allow changing the location of duplicati's files. +- The options `boot.extraModprobeConfig` and `boot.blacklistedKernelModules` now also take effect in the initrd by copying the file `/etc/modprobe.d/nixos.conf` into the initrd. + - `nixos-generate-config` now puts the dhcp configuration in `hardware-configuration.nix` instead of `configuration.nix`. - ORY Kratos was updated to version 0.8.3-alpha.1.pre.0, which introduces some breaking changes: