mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
modprobe.nix: Use modern environment.etc syntax
This commit is contained in:
parent
511f41387d
commit
549855113b
@ -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 ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user