workstation: don't clobber programs.git.attributes
Alan Pearce alan@alanpearce.eu
Mon, 24 Mar 2025 00:29:46 +0100
1 files changed, 39 insertions(+), 5 deletions(-)
M user/settings/workstation.nix → user/settings/workstation.nix
@@ -33,6 +33,45 @@ programs.git = { difftastic = { enable = true; }; + attributes = [ + # `mergiraf languages --gitattributes` + "*.java merge=mergiraf" + "*.kt merge=mergiraf" + "*.rs merge=mergiraf" + "*.go merge=mergiraf" + "*.js merge=mergiraf" + "*.jsx merge=mergiraf" + "*.mjs merge=mergiraf" + "*.json merge=mergiraf" + "*.yml merge=mergiraf" + "*.yaml merge=mergiraf" + "*.toml merge=mergiraf" + "*.html merge=mergiraf" + "*.htm merge=mergiraf" + "*.xhtml merge=mergiraf" + "*.xml merge=mergiraf" + "*.c merge=mergiraf" + "*.h merge=mergiraf" + "*.cc merge=mergiraf" + "*.cpp merge=mergiraf" + "*.hpp merge=mergiraf" + "*.cs merge=mergiraf" + "*.dart merge=mergiraf" + "*.dts merge=mergiraf" + "*.scala merge=mergiraf" + "*.sbt merge=mergiraf" + "*.ts merge=mergiraf" + "*.tsx merge=mergiraf" + "*.py merge=mergiraf" + "*.php merge=mergiraf" + "*.phtml merge=mergiraf" + "*.sol merge=mergiraf" + "*.lua merge=mergiraf" + "*.rb merge=mergiraf" + "*.nix merge=mergiraf" + "*.sv merge=mergiraf" + "*.svh merge=mergiraf" + ]; extraConfig = { "merge.mergiraf" = { name = "mergiraf"; @@ -60,10 +99,5 @@ ui = { "diff.tool" = [ "${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right" ]; }; }; - }; - xdg.configFile."git/attributes" = { - source = (pkgs.runCommandLocal "mergiraf-gitattributes" { } '' - ${pkgs.mergiraf}/bin/mergiraf languages --gitattributes >> $out - ''); }; }