1{ config, lib, ... }:
2
3let
4 cfg = config.programs.systemtap;
5in
6{
7
8 options = {
9 programs.systemtap = {
10 enable = lib.mkOption {
11 type = lib.types.bool;
12 default = false;
13 description = ''
14 Install {command}`systemtap` along with necessary kernel options.
15 '';
16 };
17 };
18 };
19 config = lib.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}