2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let cfg = config.programs.systemtap;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.systemtap = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
|
|
|
Install {command}`systemtap` along with necessary kernel options.
|
2020-04-24 23:36:52 +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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|