fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert HelgessonMerge PR #421575790441

master
686 B26 linesraw
1{ config, pkgs, lib, ... }:
2
3with lib;
4
5{
6  options.home = {
7    enableDebugInfo = mkEnableOption "" // {
8      description = ''
9        Some Nix packages provide debug symbols for
10        {command}`gdb` in the `debug` output.
11        This option ensures that those are automatically fetched from
12        the binary cache if available and {command}`gdb` is
13        configured to find those symbols.
14      '';
15    };
16  };
17
18  config = mkIf config.home.enableDebugInfo {
19    home.extraOutputsToInstall = [ "debug" ];
20
21    home.sessionVariables = {
22      NIX_DEBUG_INFO_DIRS =
23        "$NIX_DEBUG_INFO_DIRS\${NIX_DEBUG_INFO_DIRS:+:}${config.home.profileDirectory}/lib/debug";
24    };
25  };
26}