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 = { git = {
enable = true; enable = true;
extraConfig = extraConfig =
let
inherit (config.programs) vscode;
in
{ {
diff = { diff = {
tool = "vscode"; tool = lib.mkIf vscode.enable "vscode";
}; };
difftool = { difftool = {
prompt = false; prompt = false;
}; };
"difftool \"vscode\"" = { "difftool \"vscode\"" = lib.mkIf vscode.enable {
cmd = "${lib.getExe config.programs.vscode.package} --wait --diff $LOCAL $REMOTE"; cmd = "${lib.getExe vscode.package} --wait --diff $LOCAL $REMOTE";
}; };
}; };
userName = "Felix Stupp"; userName = "Felix Stupp";

Loading…
Cancel
Save