about summary refs log tree commit diff
path: root/nixos/modules/programs
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 /nixos/modules/programs
parentad2c63a23a68f4e93789d2883399ab728928c586 (diff)
downloadnixlib-44b6a1509daf214d292dadafaedf8fea994c12a5.tar
nixlib-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.gz
nixlib-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.bz2
nixlib-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.lz
nixlib-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.xz
nixlib-44b6a1509daf214d292dadafaedf8fea994c12a5.tar.zst
nixlib-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.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/bcc.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/programs/bcc.nix b/nixos/modules/programs/bcc.nix
new file mode 100644
index 000000000000..3522ab22fa8e
--- /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 ];
+  };
+}