1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

grep: fix sessionVariables mkIf evaluation error

error: The option `home.sessionVariables.GREP_COLORS' was accessed but
has no value defined. Try setting the option.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-09-21 23:14:45 -05:00
parent 06e268d66b
commit 51870a37a3

View file

@ -29,9 +29,9 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ]; home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
home.sessionVariables.GREP_COLORS = lib.mkIf (cfg.colors != { }) ( home.sessionVariables = lib.mkIf (cfg.colors != { }) {
lib.concatStringsSep ":" (lib.mapAttrsToList (n: v: "${n}=${v}") cfg.colors) GREP_COLORS = lib.concatStringsSep ":" (lib.mapAttrsToList (n: v: "${n}=${v}") cfg.colors);
); };
}; };
} }