mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
git: add delta.package option
This makes it possible to conveniently customize the `delta` package. PR #3897
This commit is contained in:
parent
5904f12d7d
commit
e21ec3db17
1 changed files with 8 additions and 4 deletions
|
@ -310,6 +310,8 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "delta" { };
|
||||
|
||||
options = mkOption {
|
||||
type = with types;
|
||||
let
|
||||
|
@ -538,11 +540,13 @@ in {
|
|||
in { diff.external = difftCommand; };
|
||||
})
|
||||
|
||||
(mkIf cfg.delta.enable {
|
||||
home.packages = [ pkgs.delta ];
|
||||
(let
|
||||
deltaPackage = cfg.delta.package;
|
||||
deltaCommand = "${deltaPackage}/bin/delta";
|
||||
in mkIf cfg.delta.enable {
|
||||
home.packages = [ deltaPackage ];
|
||||
|
||||
programs.git.iniContent = let deltaCommand = "${pkgs.delta}/bin/delta";
|
||||
in {
|
||||
programs.git.iniContent = {
|
||||
core.pager = deltaCommand;
|
||||
interactive.diffFilter = "${deltaCommand} --color-only";
|
||||
delta = cfg.delta.options;
|
||||
|
|
Loading…
Reference in a new issue