diff --git a/home/git.nix b/home/git.nix new file mode 100644 index 0000000..4916ed5 --- /dev/null +++ b/home/git.nix @@ -0,0 +1,51 @@ +{ pkgs, config, ... }: + +{ + programs.git = { + enable = true; + aliases = { + co = "checkout"; + br = "branch"; + ci = "commit"; + st = "status"; + last = "cat-file commit HEAD"; + }; + diff-so-fancy = { + enable = true; + }; + extraConfig = { + core = { + user = "Don Harper"; + email = "duck@duckland.org"; + editor = "${pkgs.neovim}/bin/nvim"; + }; + user = { + name = "Don Harper"; + email = "duck@duckland.org"; + }; + push = { + default = "simple"; + }; + pull = { + rebase = "false"; + }; + git-extras = { + github-personal-access-token = "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"; + }; + fetch = { + prune = "true"; + }; + init = { + defaultBranch = "main"; + }; + credential = { + "https://github.com" = { + helper = "!${pkgs.gh}/bin/gh auth git-credential"; + }; + "https://gist.github.com" = { + helper = "!${pkgs.gh}/bin/gh auth git-credential"; + }; + }; + }; + }; +} diff --git a/home/packages-cli.nix b/home/packages-cli.nix index 1a9255e..34ca792 100644 --- a/home/packages-cli.nix +++ b/home/packages-cli.nix @@ -3,6 +3,7 @@ imports = [ ./bash_complition.nix ./btop.nix + ./git.nix ./khal.nix ./khard.nix ./lf.nix