nix-config/home/gdb/default.nix
Bruno BELANYI 4571a39c25
All checks were successful
ci/woodpecker/push/check Pipeline was successful
home: gdb: fix 'mkMerge' invocation
The `rr` configuration should be enabled only if `gdb` is.
2023-08-13 16:18:22 +01: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
];
})
]);
}