1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 19:49:45 +01:00
home-manager/modules/misc/debug.nix
Emily 9e4a73c25e treewide: convert custom enable docs to Markdown
`nix-doc-munge` can't tell what's going on with this pattern, so I
just handled them all manually.
2023-07-17 16:49:35 +01:00

26 lines
708 B
Nix

{ config, pkgs, lib, ... }:
with lib;
{
options.home = {
enableDebugInfo = mkEnableOption (lib.mdDoc "") // {
description = lib.mdDoc ''
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.sessionVariables = {
NIX_DEBUG_INFO_DIRS =
"$NIX_DEBUG_INFO_DIRS\${NIX_DEBUG_INFO_DIRS:+:}${config.home.profileDirectory}/lib/debug";
};
};
}