From b20ef7f80917045ea3b66f5eb80dcd9c1d69b56d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 21 Aug 2021 01:13:14 +0200 Subject: [PATCH] home: gdb: add rr --- home/gdb/default.nix | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/home/gdb/default.nix b/home/gdb/default.nix index da9434e..c498048 100644 --- a/home/gdb/default.nix +++ b/home/gdb/default.nix @@ -5,13 +5,34 @@ in { options.my.home.gdb = with lib; { enable = my.mkDisableOption "gdb configuration"; + + rr = { + enable = my.mkDisableOption "rr configuration"; + + package = mkOption { + type = types.package; + default = pkgs.rr; + defaultText = literalExample "pkgs.rr"; + description = '' + Package providing rr + ''; + }; + }; }; - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - gdb - ]; + config = lib.mkMerge [ + (lib.mkIf cfg.enable { + home.packages = with pkgs; [ + gdb + ]; - xdg.configFile."gdb/gdbinit".source = ./gdbinit; - }; + xdg.configFile."gdb/gdbinit".source = ./gdbinit; + }) + + (lib.mkIf cfg.rr.enable { + home.packages = [ + cfg.rr.package + ]; + }) + ]; }