2018-07-20 21:56:59 +01: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 19:05:26 +01: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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|