about summary refs log tree commit diff
path: root/nixpkgs
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-02-21 12:52:58 +0000
committerAlyssa Ross <hi@alyssa.is>2022-02-21 18:21:29 +0000
commit769cc7b709994065a109cc3a36c4b3f5e191377d (patch)
tree263369f24277fec9bd0897d9b0affb591ac620e6 /nixpkgs
parent237d7daf7af31de4391ced866aec2dba93388226 (diff)
downloadnixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.tar
nixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.tar.gz
nixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.tar.bz2
nixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.tar.lz
nixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.tar.xz
nixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.tar.zst
nixlib-769cc7b709994065a109cc3a36c4b3f5e191377d.zip
kmod-blacklist-ubuntu: don't refer to grep/xargs
64b4af52961 ("kmod-blacklist-ubuntu: 22-1.1ubuntu1 -> 28-1ubuntu4")
doubled the size of the default initramfs.  This happened because the
upgrade introduced this configuration:

	remove iwlwifi \
	(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
	&& /sbin/modprobe -r mac80211

This meant that the grep and xargs substitutions, which had been
inactive for years, suddenly became active again and became part of
kmod-blacklist-ubuntu's closure.

Since we're already using /run/booted-system for the kmod binaries,
I think it's okay to use it for grep and xargs as well.  Both are
required NixOS packages, so they're guaranteed to be there.

Large increases in initramfs size are problematic, because it's often
not possible for users to do anything about them.  It's not always
possible to increase the size of /boot, because some filesystems like
ZFS don't support being shrunk to make way for a bigger /boot.
Diffstat (limited to 'nixpkgs')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix b/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
index 4002657ad690..d8d3ca74dce6 100644
--- a/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kmod-blacklist-ubuntu/default.nix
@@ -26,8 +26,8 @@ in stdenv.mkDerivation {
       --replace /sbin/lsmod /run/booted-system/sw/bin/lsmod \
       --replace /sbin/rmmod /run/booted-system/sw/bin/rmmod \
       --replace /sbin/modprobe /run/booted-system/sw/bin/modprobe \
-      --replace " grep " " ${gnugrep}/bin/grep " \
-      --replace " xargs " " ${findutils}/bin/xargs "
+      --replace " grep " " /run/booted-system/sw/bin/grep " \
+      --replace " xargs " " /run/booted-system/sw/bin/xargs "
   '';
 
   meta = with lib; {