aboutsummaryrefslogtreecommitdiff
path: root/users/programs/git.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-08-12 08:52:51 -0700
committerFranck Cuny <franck@fcuny.net>2025-08-12 08:52:51 -0700
commit61fa2329f553f9c7962e968e1ec98ae675903b70 (patch)
tree0afdbf7c8fddda1718abee49db6206a5f8df5b09 /users/programs/git.nix
parentdirectories first (diff)
downloadinfra-61fa2329f553f9c7962e968e1ec98ae675903b70.tar.gz
users -> home
Diffstat (limited to 'users/programs/git.nix')
-rw-r--r--users/programs/git.nix90
1 files changed, 0 insertions, 90 deletions
diff --git a/users/programs/git.nix b/users/programs/git.nix
deleted file mode 100644
index 354dc71..0000000
--- a/users/programs/git.nix
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-let
- inherit (config) userinfo;
-in
-{
- home.packages = with pkgs; [
- gitAndTools.pre-commit
- git-credential-manager
- ];
-
- programs.git = {
- enable = true;
-
- delta = {
- enable = true;
- options.features = "decorations side-by-side line-numbers";
- };
-
- userName = lib.mkDefault userinfo.fullName;
- userEmail = lib.mkDefault userinfo.email;
-
- aliases = {
- amend = "commit --amend";
- a = "commit --amend --no-edit";
- st = "status";
- co = "checkout";
- br = "branch";
- rb = "pull --rebase";
- hist = "log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all";
- llog = "log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative";
- logo = "log --pretty=format:\"%C(yellow)%h%Cred%d %Creset%s%Cblue (%cn)\" --decorate";
- logf = "log --pretty=format:\"%C(yellow)%h%Cred%d %Creset%s%Cblue (%cn)\" --decorate --numstat";
- };
-
- ignores = [
- ".DS_Store"
- ".aider.*"
- ".direnv"
- ];
-
- extraConfig = {
- core.whitespace = "trailing-space,space-before-tab";
- color.ui = true;
-
- # nicer output
- column.ui = "auto";
-
- # https://adamj.eu/tech/2024/01/18/git-improve-diff-histogram/
- diff.algorithm = "histogram";
-
- init.defaultBranch = "main";
-
- # https://blog.gitbutler.com/how-git-core-devs-configure-git/
- push = {
- # abort if the remote branch does not match the local one
- default = "simple";
- autoSetupRemote = true;
- followTags = true;
- };
-
- fetch = {
- prune = true;
- pruneTags = true;
- all = true;
- };
-
- pull.rebase = true;
-
- rebase = {
- autosquash = true;
- updateRefs = true;
- # Automatically create a temporary stash entry before the
- # operation begins, and apply it after the operation ends.
- autoStash = true;
- # Print a warning if some commits are removed
- missingCommitsCheck = "warn";
- };
-
- branch = {
- autosetuprebase = "remote";
- sort = "authordate";
- };
- };
- };
-}