summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-09-29 15:13:34 +0100
committerJoerg Thalheim <joerg@thalheim.io>2017-09-29 15:18:25 +0100
commit44b6a1509daf214d292dadafaedf8fea994c12a5 (patch)
treeaed7855628a58abbf05b2119d08c96a52714a10a
parentad2c63a23a68f4e93789d2883399ab728928c586 (diff)
downloadnixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.tar
nixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.gz
nixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.bz2
nixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.lz
nixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.xz
nixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.zst
nixpkgs-44b6a1509daf214d292dadafaedf8fea994c12a5.zip
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.
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/bcc.nix9
2 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 2b6bbcc097d..e849e634fc9 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -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
diff --git a/nixos/modules/programs/bcc.nix b/nixos/modules/programs/bcc.nix
new file mode 100644
index 00000000000..3522ab22fa8
--- /dev/null
+++ b/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 ];
+  };
+}