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
1 changed files with 9 additions and 14 deletions

View File

@ -68,20 +68,15 @@ with lib;
config = mkIf (!config.boot.isContainer) { config = mkIf (!config.boot.isContainer) {
environment.etc = [ environment.etc."modprobe.d/ubuntu.conf".source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
{ source = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
target = "modprobe.d/ubuntu.conf"; environment.etc."modprobe.d/nixos.conf".text =
} ''
{ source = pkgs.writeText "modprobe.conf" ${flip concatMapStrings config.boot.blacklistedKernelModules (name: ''
'' blacklist ${name}
${flip concatMapStrings config.boot.blacklistedKernelModules (name: '' '')}
blacklist ${name} ${config.boot.extraModprobeConfig}
'')} '';
${config.boot.extraModprobeConfig}
'';
target = "modprobe.d/nixos.conf";
}
];
environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ];