1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

ripgrep: don't set env. variable if no config (#4254)

Fixes https://github.com/nix-community/home-manager/issues/4253
This commit is contained in:
Naïm Favier 2023-07-19 18:18:40 +02:00 committed by GitHub
parent 7579044149
commit 0841242b94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,13 +30,13 @@ in {
};
config = mkIf cfg.enable {
home = {
packages = [ cfg.package ];
home = mkMerge [
{ packages = [ cfg.package ]; }
(mkIf (cfg.arguments != [ ]) {
file."${configPath}".text = lib.concatLines cfg.arguments;
file."${configPath}" =
mkIf (cfg.arguments != [ ]) { text = lib.concatLines cfg.arguments; };
sessionVariables = { "RIPGREP_CONFIG_PATH" = configPath; };
};
sessionVariables."RIPGREP_CONFIG_PATH" = configPath;
})
];
};
}