modprobe.nix: Use modern environment.etc syntax

This commit is contained in:
Eelco Dolstra 2014-07-31 22:09:10 +02:00
parent 511f41387d
commit 549855113b

View File

@ -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 ];