home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the top-level directory.
This commit is contained in:
parent
c856933803
commit
65a8f7c481
119 changed files with 2 additions and 2 deletions
38
modules/home/gdb/default.nix
Normal file
38
modules/home/gdb/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ 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
|
||||
];
|
||||
})
|
||||
]);
|
||||
}
|
||||
24
modules/home/gdb/gdbinit
Normal file
24
modules/home/gdb/gdbinit
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Keep a history of all commands in each directory
|
||||
set history save on
|
||||
|
||||
# Enable those pretty-printers
|
||||
enable pretty-printer
|
||||
|
||||
# Pretty formatting of structures
|
||||
set print pretty on
|
||||
# Show derived type based on VTable
|
||||
set print object on
|
||||
# Show static members
|
||||
set print static-members on
|
||||
# Show VTable
|
||||
set print vtbl on
|
||||
# Demangle types
|
||||
set print demangle on
|
||||
|
||||
# Read python scrips in the load path
|
||||
set auto-load python-scripts
|
||||
|
||||
# Allow autoloading project-local .gdbinit files
|
||||
add-auto-load-safe-path ~/git/
|
||||
# Allow autoloading from the Nix store
|
||||
add-auto-load-safe-path /nix/store
|
||||
Loading…
Add table
Add a link
Reference in a new issue