nixos/bcc: init module

Looks trival, but it is easy to make the mistake
to add linuxPackages.bcc to systemPackages,
which breaks if the not the default kernel is used.
This commit is contained in:
Joerg Thalheim 2017-09-29 15:13:34 +01:00
parent ad2c63a23a
commit 44b6a1509d
2 changed files with 10 additions and 0 deletions

View file

@ -73,6 +73,7 @@
./programs/adb.nix
./programs/atop.nix
./programs/bash/bash.nix
./programs/bcc.nix
./programs/blcr.nix
./programs/browserpass.nix
./programs/cdemu.nix

View file

@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
options.programs.bcc.enable = lib.mkEnableOption "bcc";
config = lib.mkIf config.programs.bcc.enable {
environment.systemPackages = [ config.boot.kernelPackages.bcc ];
boot.extraModulePackages = [ config.boot.kernelPackages.bcc ];
};
}