Skip to content

Commit

Permalink
nixos/bcc: init module
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mic92 committed Sep 29, 2017
1 parent ad2c63a commit 44b6a15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions nixos/modules/programs/bcc.nix
@@ -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 ];
};
}

0 comments on commit 44b6a15

Please sign in to comment.