summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1.nix
diff options
context:
space:
mode:
authorAlexei Robyn <shados@shados.net>2014-08-08 18:28:26 +1000
committerAlexei Robyn <shados@shados.net>2014-08-09 22:14:52 +1000
commit0aa2c1dc46779a3df6c4e02d3fae39b0de297be8 (patch)
tree6caa74d9e411f8107ddb456854f44bbf66cb0909 /nixos/modules/system/boot/stage-1.nix
parentfa907fce31cd4339e4c327067eb8d99328faea8e (diff)
downloadnixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.tar
nixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.tar.gz
nixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.tar.bz2
nixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.tar.lz
nixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.tar.xz
nixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.tar.zst
nixpkgs-0aa2c1dc46779a3df6c4e02d3fae39b0de297be8.zip
initrd: Fixed to include/use modprobe config files
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-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 6a069c5d054..1d387805443 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";
+        }
       ];
   };