nix-config/home/gdb/default.nix

43 lines
900 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
];
# FIXME: waiting for commit 64aaad6349d2b2c45063a5383f877ce9a3a0c354
2021-08-21 01:13:14 +02:00
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
# FIXME: remove once `gdb` is updated from version 10.2
home.file.".gdbinit".source = ./gdbinit;
2021-08-21 01:13:14 +02:00
})
(lib.mkIf cfg.rr.enable {
home.packages = [
cfg.rr.package
];
})
];
2021-08-20 20:03:30 +02:00
}