1{ config, lib, ... }:
2
3with lib;
4
5let cfg = config.programs.systemtap;
6in {
7
8 options = {
9 programs.systemtap = {
10 enable = mkOption {
11 default = false;
12 description = ''
13 Install <command>systemtap</command> along with necessary kernel options.
14 '';
15 };
16 };
17 };
18 config = mkIf cfg.enable {
19 system.requiredKernelConfig = with config.lib.kernelConfig; [
20 (isYes "DEBUG")
21 ];
22 boot.kernel.features.debug = true;
23 environment.systemPackages = [
24 config.boot.kernelPackages.systemtap
25 ];
26 };
27
28}