mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-07 09:31:04 +01:00
ripgrep: add module (#4017)
* ripgrep: add module * ripgrep: Apply suggestions from code review Co-authored-by: Naïm Favier <n@monade.li> * ripgrep: fix maintainers Co-authored-by: Naïm Favier <n@monade.li> * ripgrep: rename config into arguments --------- Co-authored-by: Naïm Favier <n@monade.li>
This commit is contained in:
parent
3876cc613a
commit
2951946183
7 changed files with 99 additions and 0 deletions
24
tests/modules/programs/ripgrep/custom-arguments.nix
Normal file
24
tests/modules/programs/ripgrep/custom-arguments.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, config, ... }: {
|
||||
config = {
|
||||
programs.ripgrep = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { name = "ripgrep"; };
|
||||
arguments = [
|
||||
"--max-columns-preview"
|
||||
"--colors=line:style:bold"
|
||||
"--no-require-git"
|
||||
];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/ripgrep/ripgreprc
|
||||
assertFileContent home-files/.config/ripgrep/ripgreprc ${
|
||||
pkgs.writeText "ripgrep.expected" ''
|
||||
--max-columns-preview
|
||||
--colors=line:style:bold
|
||||
--no-require-git
|
||||
''
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
12
tests/modules/programs/ripgrep/default-arguments.nix
Normal file
12
tests/modules/programs/ripgrep/default-arguments.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, ... }: {
|
||||
config = {
|
||||
programs.ripgrep = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { name = "ripgrep"; };
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/ripgrep/ripgreprc
|
||||
'';
|
||||
};
|
||||
}
|
||||
4
tests/modules/programs/ripgrep/default.nix
Normal file
4
tests/modules/programs/ripgrep/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
ripgrep-default-arguments = ./default-arguments.nix;
|
||||
ripgrep-custom-arguments = ./custom-arguments.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue