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 | |
parent | 3027b80f1df952a7d365f7ab7ad7cc483a03a1e7 (diff) | |
download | nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.tar nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.tar.gz nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.tar.bz2 nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.tar.lz nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.tar.xz nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.tar.zst nixpkgs-28875192ae411f6a44ac4f4392928b65005d11aa.zip |
programs.systemtap: add nixos option for installing systemtap
also enables debug feature on kernel
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/systemtap.nix | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 751465c9693..35f5e87d7e5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -104,6 +104,7 @@ ./programs/ssh.nix ./programs/ssmtp.nix ./programs/sysdig.nix + ./programs/systemtap.nix ./programs/sway.nix ./programs/thefuck.nix ./programs/tmux.nix diff --git a/nixos/modules/programs/systemtap.nix b/nixos/modules/programs/systemtap.nix new file mode 100644 index 00000000000..fd84732cd41 --- /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 + ]; + }; + +} |