1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 17:19:45 +01:00
home-manager/tests/modules/programs/pistol/config.nix
Matthew Toohey b7eb400d41
pistol: refactor
This pull requests refactors the pistol configuration options, since
the current options are deficient in a few ways.

Closes #3486
2022-12-16 17:05:30 +01:00

21 lines
754 B
Nix

{
programs.pistol = {
enable = true;
config = {
"text/*" =
"bat --paging=never --color=always --style=auto --wrap=character --terminal-width=%pistol-extra0% --line-range=1:%pistol-extra1% %pistol-filename%";
"application/json" =
"bat --paging=never --color=always --style=auto --wrap=character --terminal-width=%pistol-extra0% --line-range=1:%pistol-extra1% %pistol-filename%";
};
};
test.stubs.pistol = { };
test.asserts.assertions.expected = [
(let offendingFile = toString ./config.nix;
in ''
The option definition `programs.pistol.config' in `${offendingFile}' no longer has any effect; please remove it.
Pistol is now configured with programs.pistol.associations.
'')
];
}