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