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
|
|
|
|
2023-08-13 17:07:33 +02:00
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
{
|
2021-08-21 01:13:14 +02:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
gdb
|
|
|
|
];
|
|
|
|
|
2024-03-11 19:13:41 +01:00
|
|
|
xdg = {
|
|
|
|
configFile."gdb/gdbinit".source = ./gdbinit;
|
|
|
|
dataFile. "gdb/.keep".text = "";
|
|
|
|
};
|
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
GDBHISTFILE = "${config.xdg.dataHome}/gdb/gdb_history";
|
|
|
|
};
|
2023-08-13 17:07:33 +02:00
|
|
|
}
|
2021-08-21 01:13:14 +02:00
|
|
|
|
|
|
|
(lib.mkIf cfg.rr.enable {
|
|
|
|
home.packages = [
|
|
|
|
cfg.rr.package
|
|
|
|
];
|
|
|
|
})
|
2023-08-13 17:07:33 +02:00
|
|
|
]);
|
2021-08-20 20:03:30 +02:00
|
|
|
}
|