From d28a6049ca320c88ea9a4fd2724ccebb909c9020 Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Mon, 1 Dec 2025 19:26:03 -0800 Subject: [PATCH] home/private: add git base config --- flake.nix | 1 + home/private/git.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 home/private/git.nix diff --git a/flake.nix b/flake.nix index 4543659..f14fc8a 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ # Add private homelab and cloud host aliases homeManagerModules.private = { ... }: { imports = [ + ./home/private/git.nix ./home/private/ssh-hosts.nix ]; }; diff --git a/home/private/git.nix b/home/private/git.nix new file mode 100644 index 0000000..9c807b9 --- /dev/null +++ b/home/private/git.nix @@ -0,0 +1,24 @@ +{ ... }: +{ + programs.git = { + enable = true; + + extraConfig = { + credential.helper = "store --file ~/.git-credentials"; + + "url \"https://g.t1.xyz/github-mirror/\"" = { + insteadOf = [ + "https://github.com/AirGuanZ/" + "https://github.com/dmlc/" + "https://github.com/epezent/" + "https://github.com/facebook/" + "https://github.com/lz4/" + "https://github.com/nothings/" + "https://github.com/ocornut/" + "https://github.com/rapidsai/" + "https://github.com/yhirose/" + ]; + }; + }; + }; +}