1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-10 21:29:48 +01:00

git: add option to provide difftastic package

This commit is contained in:
Alex Lov 2024-08-31 18:14:50 +04:00 committed by Robert Helgesson
parent c2cd2a52e0
commit 471e3eb0a1
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -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}"