diff options
Diffstat (limited to 'nixos/modules/programs/systemtap.nix')
-rw-r--r-- | nixos/modules/programs/systemtap.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/programs/systemtap.nix b/nixos/modules/programs/systemtap.nix new file mode 100644 index 00000000000..360e106678e --- /dev/null +++ b/nixos/modules/programs/systemtap.nix @@ -0,0 +1,29 @@ +{ config, lib, ... }: + +with lib; + +let cfg = config.programs.systemtap; +in { + + options = { + programs.systemtap = { + enable = mkOption { + type = types.bool; + 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 + ]; + }; + +} |