diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 3061feff7..3f5cdc7cc 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -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}"