mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
git: add option to provide difftastic package
This commit is contained in:
parent
c2cd2a52e0
commit
471e3eb0a1
1 changed files with 4 additions and 2 deletions
|
@ -222,6 +222,8 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "difftastic" { };
|
||||
|
||||
background = mkOption {
|
||||
type = types.enum [ "light" "dark" ];
|
||||
default = "light";
|
||||
|
@ -478,11 +480,11 @@ in {
|
|||
})
|
||||
|
||||
(mkIf cfg.difftastic.enable {
|
||||
home.packages = [ pkgs.difftastic ];
|
||||
home.packages = [ cfg.difftastic.package ];
|
||||
|
||||
programs.git.iniContent = let
|
||||
difftCommand = concatStringsSep " " [
|
||||
"${pkgs.difftastic}/bin/difft"
|
||||
"${getExe cfg.difftastic.package}"
|
||||
"--color ${cfg.difftastic.color}"
|
||||
"--background ${cfg.difftastic.background}"
|
||||
"--display ${cfg.difftastic.display}"
|
||||
|
|
Loading…
Reference in a new issue