mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
git: add extraArgs option for difftastic
This option will cover any other arguments that aren't made available with dedicated options.
This commit is contained in:
parent
1652349e57
commit
7d3d323e90
3 changed files with 28 additions and 9 deletions
|
|
@ -377,6 +377,18 @@ in
|
|||
Determines how the output displays - in one column or two columns.
|
||||
'';
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
example = [
|
||||
"--tab-width=8"
|
||||
"--sort-paths"
|
||||
];
|
||||
description = ''
|
||||
Extra command line arguments to pass to {command}`difft`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
delta = {
|
||||
|
|
@ -837,13 +849,16 @@ in
|
|||
|
||||
(
|
||||
let
|
||||
difftCommand = concatStringsSep " " [
|
||||
"${lib.getExe cfg.difftastic.package}"
|
||||
"--color ${cfg.difftastic.color}"
|
||||
"--background ${cfg.difftastic.background}"
|
||||
"--display ${cfg.difftastic.display}"
|
||||
"--context ${toString cfg.difftastic.context}"
|
||||
];
|
||||
difftCommand = concatStringsSep " " (
|
||||
[
|
||||
"${lib.getExe cfg.difftastic.package}"
|
||||
"--color ${cfg.difftastic.color}"
|
||||
"--background ${cfg.difftastic.background}"
|
||||
"--display ${cfg.difftastic.display}"
|
||||
"--context ${toString cfg.difftastic.context}"
|
||||
]
|
||||
++ (lib.optionals (cfg.difftastic.extraArgs != null) cfg.difftastic.extraArgs)
|
||||
);
|
||||
in
|
||||
(lib.mkMerge [
|
||||
(mkIf cfg.difftastic.enable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue