mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
error: The option `home.sessionVariables.GCC_COLORS' was accessed but has no value defined. Try setting the option. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
36 lines
754 B
Nix
36 lines
754 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.programs.gcc;
|
|
|
|
in
|
|
{
|
|
|
|
meta.maintainers = [ lib.maintainers.bmrips ];
|
|
|
|
options.programs.gcc = {
|
|
enable = lib.mkEnableOption "{command}`gcc`.";
|
|
package = lib.mkPackageOption pkgs "gcc" { nullable = true; };
|
|
colors = lib.mkOption {
|
|
type = with lib.types; attrsOf str;
|
|
default = { };
|
|
description = "Settings for {env}`GCC_COLORS`";
|
|
example = {
|
|
error = "01;31";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
|
home.sessionVariables = lib.mkIf (cfg.colors != { }) {
|
|
GCC_COLORS = lib.concatStringsSep ":" (lib.mapAttrsToList (n: v: "${n}=${v}") cfg.colors);
|
|
};
|
|
};
|
|
|
|
}
|