Bruno BELANYI
fbd3b70d61
All checks were successful
ci/woodpecker/push/check Pipeline was successful
It's specified as the place to put them, so let's make use of it I guess.
41 lines
777 B
Nix
41 lines
777 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
cfg = config.my.home.gdb;
|
|
in
|
|
{
|
|
options.my.home.gdb = with lib; {
|
|
enable = my.mkDisableOption "gdb configuration";
|
|
|
|
package = mkPackageOption pkgs "gdb" { };
|
|
|
|
rr = {
|
|
enable = my.mkDisableOption "rr configuration";
|
|
|
|
package = mkPackageOption pkgs "rr" { };
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
{
|
|
home.packages = with pkgs; [
|
|
cfg.package
|
|
];
|
|
|
|
xdg = {
|
|
configFile."gdb/gdbinit".source = ./gdbinit;
|
|
stateFile."gdb/.keep".text = "";
|
|
};
|
|
|
|
home.sessionVariables = {
|
|
GDBHISTFILE = "${config.xdg.stateHome}/gdb/gdb_history";
|
|
};
|
|
}
|
|
|
|
(lib.mkIf cfg.rr.enable {
|
|
home.packages = [
|
|
cfg.rr.package
|
|
];
|
|
})
|
|
]);
|
|
}
|