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;
|
|
|
|
description = ''
|
|
|
|
Install <command>systemtap</command> along with necessary kernel options.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
|
|
|
(isYes "DEBUG")
|
|
|
|
];
|
|
|
|
boot.kernel.features.debug = true;
|
|
|
|
environment.systemPackages = [
|
|
|
|
config.boot.kernelPackages.systemtap
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|