about summary refs log tree commit diff
path: root/nixos/modules/system/boot/modprobe.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-31 22:09:10 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-07-31 22:09:51 +0200
commit549855113badde8692d84959cc42d8b5cce0f579 (patch)
tree7e9310d88f9b589e9a4712e0c19d225d7dd117ce /nixos/modules/system/boot/modprobe.nix
parent511f41387d612b08bed4577dfe1ddfa817a2d29c (diff)
modprobe.nix: Use modern environment.etc syntax
Diffstat (limited to 'nixos/modules/system/boot/modprobe.nix')
-rw-r--r--nixos/modules/system/boot/modprobe.nix23
1 files changed, 9 insertions, 14 deletions
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix
index 7b214cd1e1f54..652eb046f50a7 100644
--- a/nixos/modules/system/boot/modprobe.nix
+++ b/nixos/modules/system/boot/modprobe.nix
@@ -68,20 +68,15 @@ with lib;
 
   config = mkIf (!config.boot.isContainer) {
 
-    environment.etc = [
-      { source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
-        target = "modprobe.d/ubuntu.conf";
-      }
-      { source = pkgs.writeText "modprobe.conf"
-          ''
-            ${flip concatMapStrings config.boot.blacklistedKernelModules (name: ''
-              blacklist ${name}
-            '')}
-            ${config.boot.extraModprobeConfig}
-          '';
-        target = "modprobe.d/nixos.conf";
-      }
-    ];
+    environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
+
+    environment.etc."modprobe.d/nixos.conf".text =
+      ''
+        ${flip concatMapStrings config.boot.blacklistedKernelModules (name: ''
+          blacklist ${name}
+        '')}
+        ${config.boot.extraModprobeConfig}
+      '';
 
     environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ];