summary refs log blame commit diff
path: root/nixos/modules/programs/systemtap.nix
blob: 360e106678e655f2b54b97e85858656c32037e1a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                     








                                    
                          

















                                                                                   
{ 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
    ];
  };

}