nix-config/home/gdb/default.nix

39 lines
715 B
Nix
Raw Normal View History

2021-08-20 20:03:30 +02:00
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.gdb;
in
{
options.my.home.gdb = with lib; {
enable = my.mkDisableOption "gdb configuration";
2021-08-21 01:13:14 +02:00
rr = {
enable = my.mkDisableOption "rr configuration";
2021-08-20 20:03:30 +02:00
2021-08-21 01:13:14 +02:00
package = mkOption {
type = types.package;
default = pkgs.rr;
defaultText = literalExample "pkgs.rr";
description = ''
Package providing rr
'';
};
};
2021-08-20 20:03:30 +02:00
};
2021-08-21 01:13:14 +02:00
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home.packages = with pkgs; [
gdb
];
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
})
(lib.mkIf cfg.rr.enable {
home.packages = [
cfg.rr.package
];
})
];
2021-08-20 20:03:30 +02:00
}