diff --git a/home/apps/git.nix b/home/apps/git.nix index 0e4c319..07bcd64 100644 --- a/home/apps/git.nix +++ b/home/apps/git.nix @@ -2,9 +2,7 @@ config, pkgs, ... -}: let - inherit (pkgs.stdenv.hostPlatform) isDarwin; -in { +}: { sops.secrets."gitconfig-work".path = "${config.xdg.configHome}/git/gitconfig-work"; programs.git.includes = [ { @@ -31,7 +29,7 @@ in { gzip = "!git archive --format=tar.gz --output=$(basename $(git rev-parse --show-toplevel)).tar.gz $(git rev-parse --short HEAD)"; zip = "!git archive --format=zip --output=$(basename $(git rev-parse --show-toplevel)).zip $(git rev-parse --short HEAD)"; # for those 3am commits - yolo = "!git commit -m \"chore: $(curl -s whatthecommit.com/index.txt)\""; + yolo = "!git commit -m \"chore: $(curl -s https://whatthecommit.com/index.txt)\""; }; lfs.enable = true; @@ -51,10 +49,7 @@ in { ]; # disable the macOS keychain, only use gopass - package = - if isDarwin - then (pkgs.git.override {osxkeychainSupport = false;}) - else pkgs.git; + package = pkgs.git.override {osxkeychainSupport = false;}; extraConfig = { credential.helper = "gopass"; @@ -63,10 +58,10 @@ in { push.gpgSign = "if-asked"; rebase.autosquash = true; url = { - "https://github.com/".insteadOf = "github:"; - "https://github.com/catppuccin/".insteadOf = "catppuccin:"; - "https://github.com/nekowinston/".insteadOf = "nekowinston:"; - "https://gitlab.com/".insteadOf = "gitlab:"; + "https://github.com/".insteadOf = "gh:"; + "https://github.com/catppuccin/".insteadOf = "ctp:"; + "https://github.com/nekowinston/".insteadOf = "winston:"; + "https://gitlab.com/".insteadOf = "gl:"; }; }; };