1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-16 16:19:44 +01:00
home-manager/modules/misc/debug.nix

25 lines
642 B
Nix

{ config, pkgs, lib, ... }:
with lib;
{
options.home = {
enableDebugInfo = 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 = mkIf config.home.enableDebugInfo {
home.extraOutputsToInstall = [ "debug" ];
home.sessionSearchVariables = {
NIX_DEBUG_INFO_DIRS = [ "${config.home.profileDirectory}/lib/debug" ];
};
};
}