mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 12:12:03 +00:00
34 lines
491 B
Nix
34 lines
491 B
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
cfg = config.nmasur.presets.programs.ripgrep;
|
||
|
in
|
||
|
|
||
|
{
|
||
|
|
||
|
options.nmasur.presets.programs.ripgrep = {
|
||
|
enable = lib.mkEnableOption "Ripgrep search tool";
|
||
|
ignorePatterns = ''
|
||
|
!.env*
|
||
|
!.github/
|
||
|
!.gitignore
|
||
|
!*.tfvars
|
||
|
.terraform/
|
||
|
.target/
|
||
|
/Library/'';
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
home.packages = [ pkgs.ripgrep ];
|
||
|
|
||
|
home.file = {
|
||
|
".rgignore".text = cfg.ignorePatterns;
|
||
|
};
|
||
|
};
|
||
|
}
|