1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-18 14:28:15 +00:00
home-manager/modules/misc/debug.nix
2025-03-09 12:20:08 -05:00

23 lines
633 B
Nix

{ config, lib, ... }:
{
options.home = {
enableDebugInfo = lib.mkEnableOption "" // {
description = ''
Some Nix packages provide debug symbols for
{command}`gdb` in the `debug` output.
This option ensures that those are automatically fetched from
the binary cache if available and {command}`gdb` is
configured to find those symbols.
'';
};
};
config = lib.mkIf config.home.enableDebugInfo {
home.extraOutputsToInstall = [ "debug" ];
home.sessionSearchVariables = {
NIX_DEBUG_INFO_DIRS = [ "${config.home.profileDirectory}/lib/debug" ];
};
};
}