39 lines
635 B
Nix
Raw Normal View History

2025-01-20 22:35:40 -05:00
{
config,
pkgs,
lib,
...
}:
let
cfg = config.nmasur.presets.programs.ripgrep;
in
{
options.nmasur.presets.programs.ripgrep = {
enable = lib.mkEnableOption "Ripgrep search tool";
2025-02-18 17:44:39 -05:00
ignorePatterns = lib.mkOption {
type = lib.types.lines;
description = "Patterns to ignore with ripgrep";
default = ''
!.env*
!.github/
!.gitignore
!*.tfvars
.terraform/
.target/
/Library/
'';
};
2025-01-20 22:35:40 -05:00
};
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.ripgrep ];
home.file = {
".rgignore".text = cfg.ignorePatterns;
};
};
}