diff --git a/configs/git/.gitconfig b/configs/.gitconfig similarity index 85% rename from configs/git/.gitconfig rename to configs/.gitconfig index 1f7e472..1177c91 100644 --- a/configs/git/.gitconfig +++ b/configs/.gitconfig @@ -1,10 +1,6 @@ -[include] - # NOTE: These paths are imported if they exist and ignored if they don't - # This allows us to have a single config file for all our machines - # and control the specifics by symlinking the relevant files per-machine - path = ~/.config/git/config-fragments/global-mailmap.gitconfig - path = ~/.config/git/config-fragments/personal-info.gitconfig - path = ~/.config/git/config-fragments/enable-signing.gitconfig +[user] + email = evan@ewpratten.com + name = Evan Pratten [init] defaultBranch = master @@ -83,3 +79,8 @@ [push] autoSetupRemote = true + +# Allow machines to individually override settings +# NOTE: THIS MUST BE AT THE BOTTOM +[include] + path = ~/.gitconfig.local diff --git a/configs/git/.mailmap b/configs/git/.mailmap deleted file mode 100644 index 992bb9a..0000000 --- a/configs/git/.mailmap +++ /dev/null @@ -1,7 +0,0 @@ -Evan Pratten -Evan Pratten -William Meathrel -Carter Tomlenovich -James Nickoli -Sam Lownie -Sam Lownie <30960735+slownie@users.noreply.github.com> \ No newline at end of file diff --git a/configs/git/config-fragments/enable-signing.gitconfig b/configs/git/config-fragments/enable-signing.gitconfig deleted file mode 100644 index f392a2a..0000000 --- a/configs/git/config-fragments/enable-signing.gitconfig +++ /dev/null @@ -1,6 +0,0 @@ -[gpg] - format = ssh - -[gpg "ssh"] - allowedSignersFile = ~/.ssh/allowed_signers - defaultKeyCommand = ssh-add -L \ No newline at end of file diff --git a/configs/git/config-fragments/global-mailmap.gitconfig b/configs/git/config-fragments/global-mailmap.gitconfig deleted file mode 100644 index 4953fee..0000000 --- a/configs/git/config-fragments/global-mailmap.gitconfig +++ /dev/null @@ -1,4 +0,0 @@ -# Feel free to overwrite this file. It is only copied once. - -[mailmap] - file = ~/.config/git/.mailmap diff --git a/configs/git/config-fragments/personal-info.gitconfig b/configs/git/config-fragments/personal-info.gitconfig deleted file mode 100644 index 1b89904..0000000 --- a/configs/git/config-fragments/personal-info.gitconfig +++ /dev/null @@ -1,10 +0,0 @@ -[user] - email = evan@ewpratten.com - name = Evan Pratten - signingkey = ~/.ssh/id_ed25519_sk_rk_yk20572395 - -[sendemail] - smtpserver = smtp.migadu.com - smtpuser = evan@ewpratten.com - smtpencryption = tls - smtpserverport = 587 diff --git a/install-linux.sh b/install-linux.sh index 93bb930..a8b1d98 100644 --- a/install-linux.sh +++ b/install-linux.sh @@ -32,8 +32,6 @@ mkdir -p ~/.config/termux mkdir -p ~/.config/logid mkdir -p ~/.config/systemd/user mkdir -p ~/.config/glab-cli -mkdir -p ~/.config/git -mkdir -p ~/.config/git/config-fragments mkdir -p ~/.config/user-tmpfiles.d mkdir -p ~/.config/gqrx mkdir -p ~/.cargo @@ -49,29 +47,7 @@ ln -sf $EWCONFIG_ROOT/configs/.zshrc ~/.zshrc ln -sf $EWCONFIG_ROOT/configs/.zshrc ~/.bashrc # Configure Git -ln -sf $EWCONFIG_ROOT/configs/git/.gitconfig ~/.gitconfig -ln -sf $EWCONFIG_ROOT/configs/sssh/allowed_signers ~/.ssh/allowed_signers -ln -sf $EWCONFIG_ROOT/configs/git/.mailmap ~/.config/git/.mailmap - -# Copy the global mailmap file once -if [ ! -f ~/.config/git/config-fragments/global-mailmap.gitconfig ]; then - cp $EWCONFIG_ROOT/configs/git/config-fragments/global-mailmap.gitconfig ~/.config/git/config-fragments/global-mailmap.gitconfig -fi - -# Check if GIT is installed > 2.34 -set +x -if type -p git > /dev/null; then - # If sort has a -V option - if man sort | grep -q -- -V; then - # If GIT has SSH signing support, enable it - git_version=$(git --version | cut -d' ' -f3 | cut -d'.' -f1-2) - minimum_version=2.34 - if [ "$(printf '%s\n' "$minimum_version" "$git_version" | sort -V | head -n1)" = "$minimum_version" ]; then - set -x - ln -sf $EWCONFIG_ROOT/configs/git/config-fragments/enable-signing.gitconfig ~/.config/git/config-fragments/enable-signing.gitconfig - fi - fi -fi +ln -sf $EWCONFIG_ROOT/configs/.gitconfig ~/.gitconfig # Configure SSH ln -sf $EWCONFIG_ROOT/configs/ssh/config ~/.ssh/config @@ -140,19 +116,6 @@ if [ -d ~/.config/obs-studio ]; then ln -sf $EWCONFIG_ROOT/configs/obs-studio/basic/scenes/Webcam_Controls.json ~/.config/obs-studio/basic/scenes/Webcam_Controls.json fi -# -- Optional Configs -- -set +x - -# If ~/.config/git/config-fragments/personal-info.gitconfig does not exist -if [ ! -f ~/.config/git/config-fragments/personal-info.gitconfig ]; then - # Ask if the user wants to install personal GIT config - echo -n "Do you want to install the personal GIT config? (y/n) " - read -r install_git_config - if [ "$install_git_config" = "y" ]; then - ln -sf $EWCONFIG_ROOT/configs/git/config-fragments/personal-info.gitconfig ~/.config/git/config-fragments/personal-info.gitconfig - fi -fi - # Link houdini scripts for appropriate versions if [ -d ~/houdini19.5 ]; then mkdir -p ~/houdini19.5/scripts; ln -sf $EWCONFIG_ROOT/configs/houdini19.5/scripts/* ~/houdini19.5/scripts; fi diff --git a/install-windows.sh b/install-windows.sh index 4018829..5c234c6 100644 --- a/install-windows.sh +++ b/install-windows.sh @@ -18,8 +18,6 @@ mkdir -p ~/bin # Personal bin dir. Reduces the risk of breaking ~/.loca mkdir -p ~/projects # For my projects # Build the directory structure if ~/.config -mkdir -p ~/.config/git -mkdir -p ~/.config/git/config-fragments mkdir -p ~/.cargo mkdir -p ~/.ssh @@ -32,9 +30,7 @@ mkdir -p $LOCALAPPDATA/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalSta ln -sf $EWCONFIG_ROOT/configs/windows-terminal/settings.json $LOCALAPPDATA/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json # Configure Git -ln -sf $EWCONFIG_ROOT/configs/git/.gitconfig ~/.gitconfig -ln -sf $EWCONFIG_ROOT/configs/sssh/allowed_signers ~/.ssh/allowed_signers || true -ln -sf $EWCONFIG_ROOT/configs/git/.mailmap ~/.config/git/.mailmap +ln -sf $EWCONFIG_ROOT/configs/.gitconfig ~/.gitconfig # Configure Vim ln -sf $EWCONFIG_ROOT/configs/vim/.vimrc ~/.vimrc