diff --git a/modules/programs/ripgrep.nix b/modules/programs/ripgrep.nix index 39b318243..cbd73bd15 100644 --- a/modules/programs/ripgrep.nix +++ b/modules/programs/ripgrep.nix @@ -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; + }) + ]; }; }