summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2014-08-23 12:46:28 +0400
committerMichael Raskin <7c6f434c@mail.ru>2014-08-23 12:46:28 +0400
commit4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8 (patch)
tree305d56a73981dd4bbaa80d4fd7986e41a81cfa83 /nixos/modules/system
parentbd9e07c24c39c68e1cc8aa9ccd05800686f8a99a (diff)
parent0aa2c1dc46779a3df6c4e02d3fae39b0de297be8 (diff)
downloadnixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.tar
nixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.tar.gz
nixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.tar.bz2
nixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.tar.lz
nixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.tar.xz
nixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.tar.zst
nixlib-4a56121d8e5b59b16b6dbcfb05e1f2a58773c6e8.zip
Merge pull request #3505 from Shados/fix-initrd-modprobe
initrd: Fixed to include/use modprobe config files
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/stage-1.nix15
1 files changed, 15 insertions, 0 deletions
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";
+        }
       ];
   };