From 13481e49d2430826b60c8fa6421c8bba06a52dfa Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Sat, 13 Apr 2024 13:42:56 -0400 Subject: [PATCH] add git config Signed-off-by: ahuston-0 --- users/alice/home.nix | 1 + users/alice/home/git.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 users/alice/home/git.nix diff --git a/users/alice/home.nix b/users/alice/home.nix index cc8d87c..be4eb15 100644 --- a/users/alice/home.nix +++ b/users/alice/home.nix @@ -5,6 +5,7 @@ ./home/zsh.nix ./home/doom ./home/gammastep.nix + ./home/git.nix ]; home = { diff --git a/users/alice/home/git.nix b/users/alice/home/git.nix new file mode 100644 index 0000000..2cd9f89 --- /dev/null +++ b/users/alice/home/git.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + programs.git = { + enable = true; + signing = { + key = "F63832C3080D6E1AC77EECF80B4245FFE305BC82"; + signByDefault = true; + }; + userEmail = "aliceghuston@gmail.com"; + userName = "ahuston-0"; + includes.config.contents = { + alias = { + gone = + !"git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"; + }; + push.autosetupremote = true; + pull.rebase = true; + color.ui = true; + }; + }; +}