2018-07-20 20:56:59 +00:00
|
|
|
{ config, lib, ... }:
|
2018-02-09 22:13:38 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let cfg = config.programs.systemtap;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.systemtap = {
|
|
|
|
enable = mkOption {
|
2020-04-20 18:05:26 +00:00
|
|
|
type = types.bool;
|
2018-02-09 22:13:38 +00:00
|
|
|
default = false;
|
2022-07-28 21:19:15 +00:00
|
|
|
description = lib.mdDoc ''
|
|
|
|
Install {command}`systemtap` along with necessary kernel options.
|
2018-02-09 22:13:38 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
|
|
|
(isYes "DEBUG")
|
|
|
|
];
|
|
|
|
boot.kernel.features.debug = true;
|
|
|
|
environment.systemPackages = [
|
|
|
|
config.boot.kernelPackages.systemtap
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|