1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-18 22:33:00 +00:00
home-manager/modules/misc/debug.nix

25 lines
683 B
Nix
Raw Normal View History

{ 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 =
"$NIX_DEBUG_INFO_DIRS\${NIX_DEBUG_INFO_DIRS:+:}${config.home.profileDirectory}/lib/debug";
};
};
}