about summary refs log tree commit diff
path: root/nix/profiles/home-manager/git.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nix/profiles/home-manager/git.nix76
1 files changed, 0 insertions, 76 deletions
diff --git a/nix/profiles/home-manager/git.nix b/nix/profiles/home-manager/git.nix
deleted file mode 100644
index cba49f9..0000000
--- a/nix/profiles/home-manager/git.nix
+++ /dev/null
@@ -1,76 +0,0 @@
-{ pkgs, config, lib, ... }: {
-  programs.git = {
-    enable = true;
-    userName = "Franck Cuny";
-
-    aliases = {
-      amend = "commit --amend";
-      ll = ''log --pretty="format:%h %G? %aN  %s"'';
-    };
-
-    includes = [
-      {
-        condition = "hasconfig:remote.*.url:git@github.rbx.com:**";
-        path = pkgs.writeText "finsitGitConfig"
-          (lib.generators.toGitINI { user.email = "fcuny@roblox.com"; });
-      }
-      {
-        condition = "hasconfig:remote.*.url:git@github.com:Roblox/**";
-        path = pkgs.writeText "finsitGitConfig"
-          (lib.generators.toGitINI { user.email = "fcuny@roblox.com"; });
-      }
-    ];
-
-    extraConfig = {
-      core.whitespace = "trailing-space,space-before-tab";
-      color.ui = "true";
-
-      # abort if the remote branch does not match the local one
-      push.default = "simple";
-
-      # https://adamj.eu/tech/2024/01/18/git-improve-diff-histogram/
-      diff.algorithm = "histogram";
-
-      init.defaultBranch = "main";
-
-      pull.rebase = true;
-      rebase = {
-        # 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";
-      branch.sort = "authordate";
-
-      commit.template = "${config.xdg.dataHome}/git/commit.template";
-
-      url = {
-        "ssh://git@github.rbx.com/" = {
-          insteadOf = "https://github.rbx.com/";
-        };
-      };
-    };
-
-    ignores = [ "*~" ".envrc" ".direnv" "__pycache__" ];
-  };
-
-  xdg.dataFile."git/commit.template".source =
-    pkgs.writeText "commit.template" ''
-
-      # (If applied, this commit will...) <subject>
-
-      # Explain why this change is being made
-
-      # --- COMMIT END ---
-      # Remember to
-      #    Use the imperative mood, present tense: `change' not `changed' nor `changes'
-      #    Do not end the subject line with a period
-      #    Use the body to explain what and why vs. how
-      #    Can use multiple lines with "-" for bullet points in body
-    '';
-
-  home.packages = with pkgs; [ gitAndTools.pre-commit git-credential-manager ];
-}