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