lol

programs.systemtap: add nixos option for installing systemtap

also enables debug feature on kernel

authored by

Herwig Hochleitner and committed by
Herwig Hochleitner
28875192 3027b80f

+29
+1
nixos/modules/module-list.nix
··· 104 104 ./programs/ssh.nix 105 105 ./programs/ssmtp.nix 106 106 ./programs/sysdig.nix 107 + ./programs/systemtap.nix 107 108 ./programs/sway.nix 108 109 ./programs/thefuck.nix 109 110 ./programs/tmux.nix
+28
nixos/modules/programs/systemtap.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let cfg = config.programs.systemtap; 6 + in { 7 + 8 + options = { 9 + programs.systemtap = { 10 + enable = mkOption { 11 + default = false; 12 + description = '' 13 + Install <command>systemtap</command> along with necessary kernel options. 14 + ''; 15 + }; 16 + }; 17 + }; 18 + config = mkIf cfg.enable { 19 + system.requiredKernelConfig = with config.lib.kernelConfig; [ 20 + (isYes "DEBUG") 21 + ]; 22 + boot.kernel.features.debug = true; 23 + environment.systemPackages = [ 24 + config.boot.kernelPackages.systemtap 25 + ]; 26 + }; 27 + 28 + }