nixosMod/frontend: config git difftool vscode conditionally

main
Felix Stupp 2 months ago
parent 463e7c642e
commit 3d0e663a25
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -141,15 +141,18 @@ in
git = {
enable = true;
extraConfig =
let
inherit (config.programs) vscode;
in
{
diff = {
tool = "vscode";
tool = lib.mkIf vscode.enable "vscode";
};
difftool = {
prompt = false;
};
"difftool \"vscode\"" = {
cmd = "${lib.getExe config.programs.vscode.package} --wait --diff $LOCAL $REMOTE";
"difftool \"vscode\"" = lib.mkIf vscode.enable {
cmd = "${lib.getExe vscode.package} --wait --diff $LOCAL $REMOTE";
};
};
userName = "Felix Stupp";

Loading…
Cancel
Save