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