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