diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2018-02-09 23:13:38 +0100 |
---|---|---|
committer | Herwig Hochleitner <hhochleitner@gmail.com> | 2018-02-15 09:10:32 +0100 |
commit | 28875192ae411f6a44ac4f4392928b65005d11aa (patch) | |
tree | 623a36001c3fe3caf22dbfb1120b0ef1558a26b7 /nixos/modules/programs/systemtap.nix | |
parent | 3027b80f1df952a7d365f7ab7ad7cc483a03a1e7 (diff) |
programs.systemtap: add nixos option for installing systemtap
also enables debug feature on kernel
Diffstat (limited to 'nixos/modules/programs/systemtap.nix')
-rw-r--r-- | nixos/modules/programs/systemtap.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/modules/programs/systemtap.nix b/nixos/modules/programs/systemtap.nix new file mode 100644 index 000000000000..fd84732cd412 --- /dev/null +++ b/nixos/modules/programs/systemtap.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +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 + ]; + }; + +} |