mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01: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 {
|
background = mkOption {
|
||||||
type = types.enum [ "light" "dark" ];
|
type = types.enum [ "light" "dark" ];
|
||||||
default = "light";
|
default = "light";
|
||||||
|
@ -478,11 +480,11 @@ in {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.difftastic.enable {
|
(mkIf cfg.difftastic.enable {
|
||||||
home.packages = [ pkgs.difftastic ];
|
home.packages = [ cfg.difftastic.package ];
|
||||||
|
|
||||||
programs.git.iniContent = let
|
programs.git.iniContent = let
|
||||||
difftCommand = concatStringsSep " " [
|
difftCommand = concatStringsSep " " [
|
||||||
"${pkgs.difftastic}/bin/difft"
|
"${getExe cfg.difftastic.package}"
|
||||||
"--color ${cfg.difftastic.color}"
|
"--color ${cfg.difftastic.color}"
|
||||||
"--background ${cfg.difftastic.background}"
|
"--background ${cfg.difftastic.background}"
|
||||||
"--display ${cfg.difftastic.display}"
|
"--display ${cfg.difftastic.display}"
|
||||||
|
|
Loading…
Reference in a new issue