From 9cfb279852eb73d937f43cb1317ec3605120a9f0 Mon Sep 17 00:00:00 2001 From: Tomodachi94 Date: Sat, 22 Jun 2024 22:48:44 -0700 Subject: [PATCH] home/git: add some default ignores --- home/common/git.nix | 5 ++++- home/darwin/default.nix | 1 + home/darwin/git.nix | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 home/darwin/git.nix diff --git a/home/common/git.nix b/home/common/git.nix index d286cfb..eadeaf2 100644 --- a/home/common/git.nix +++ b/home/common/git.nix @@ -16,7 +16,10 @@ xdg-open = "!${pkgs.lib.getExe pkgs.github-cli} browse"; sync-upstream = "!${pkgs.git}/bin/git fetch upstream master && ${pkgs.git}/bin/git rebase upstream/master && ${pkgs.git}/bin/git push origin master"; }; - + ignores = [ + ".direnv/" + "/tags" # Neovim + ]; extraConfig = { init = { defaultBranch = "main"; diff --git a/home/darwin/default.nix b/home/darwin/default.nix index 4d190b6..990a629 100644 --- a/home/darwin/default.nix +++ b/home/darwin/default.nix @@ -3,6 +3,7 @@ imports = [ mac-app-util.homeManagerModules.default ./desktop-standalone-packages.nix + ./git.nix ./zsh.nix ]; } diff --git a/home/darwin/git.nix b/home/darwin/git.nix new file mode 100644 index 0000000..8ebccdd --- /dev/null +++ b/home/darwin/git.nix @@ -0,0 +1,7 @@ +{ + programs.git = { + ignores = [ + ".DS_Store" # https://en.wikipedia.org/wiki/.DS_Store + ]; + }; +}