From 549855113badde8692d84959cc42d8b5cce0f579 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Jul 2014 22:09:10 +0200 Subject: modprobe.nix: Use modern environment.etc syntax --- nixos/modules/system/boot/modprobe.nix | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'nixos/modules/system/boot/modprobe.nix') 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 ]; -- cgit 1.4.1