nix-config/modules/home/gdb/default.nix
Bruno BELANYI 65a8f7c481 home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the
top-level directory.
2023-11-11 18:12:05 +00:00

39 lines
715 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.home.gdb;
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 (lib.mkMerge [
{
home.packages = with pkgs; [
gdb
];
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
}
(lib.mkIf cfg.rr.enable {
home.packages = [
cfg.rr.package
];
})
]);
}