From 0aa2c1dc46779a3df6c4e02d3fae39b0de297be8 Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Fri, 8 Aug 2014 18:28:26 +1000 Subject: initrd: Fixed to include/use modprobe config files --- nixos/modules/system/boot/stage-1.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'nixos/modules/system') diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 6a069c5d0540..1d3878054432 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -199,6 +199,21 @@ let { object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf; symlink = "/etc/mdadm.conf"; } + { object = config.environment.etc."modprobe.d/nixos.conf".source; + symlink = "/etc/modprobe.d/nixos.conf"; + } + { object = pkgs.stdenv.mkDerivation { + name = "initrd-kmod-blacklist-ubuntu"; + builder = pkgs.writeText "builder.sh" '' + source $stdenv/setup + target=$out + + ${pkgs.perl}/bin/perl -0pe 's/## file: iwlwifi.conf(.+?)##/##/s;' $src > $out + ''; + src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; + }; + symlink = "/etc/modprobe.d/ubuntu.conf"; + } ]; }; -- cgit 1.4.1