diff --git a/configs/git/.gitconfig b/configs/git/.gitconfig index 7d9a6b1..700f478 100644 --- a/configs/git/.gitconfig +++ b/configs/git/.gitconfig @@ -1,11 +1,11 @@ +[include] + path = ~/.config/git/features/enable-signing.gitconfig + [user] email = ewpratten@gmail.com name = Evan Pratten signingkey = ~/.ssh/id_ed25519_sk_rk_yk20572395 -[gpg] - format = ssh - [init] defaultBranch = master @@ -18,10 +18,6 @@ [alias] authors = shortlog --summary --numbered --email -[gpg "ssh"] - allowedSignersFile = ~/.ssh/allowed_signers - defaultKeyCommand = ssh-add -L - [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f diff --git a/configs/git/features/enable-signing.gitconfig b/configs/git/features/enable-signing.gitconfig new file mode 100644 index 0000000..f392a2a --- /dev/null +++ b/configs/git/features/enable-signing.gitconfig @@ -0,0 +1,6 @@ +[gpg] + format = ssh + +[gpg "ssh"] + allowedSignersFile = ~/.ssh/allowed_signers + defaultKeyCommand = ssh-add -L \ No newline at end of file diff --git a/helpers/git-config-features.sh b/helpers/git-config-features.sh new file mode 100644 index 0000000..5736766 --- /dev/null +++ b/helpers/git-config-features.sh @@ -0,0 +1,7 @@ +#! /bin/bash +set -e + +if [[ "$HOSTNAME" == "fedora" ]] || [[ "$HOSTNAME" == "ewpratten-laptop" ]]; then + mkdir -p $HOME/.config/git/features + ln -sf $EWCONFIG_ROOT/configs/git/features/enable-signing.gitconfig $HOME/.config/git/features/enable-signing.gitconfig +fi \ No newline at end of file diff --git a/install.conf.yaml b/install.conf.yaml index cd90227..17c0203 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -63,3 +63,4 @@ - [chmod +x configs/scripts/fetch-steamdeck-screenshots, Making fetch-steamdeck-screenshots executable] - [sh ./helpers/configure-gnome.sh, Configuring GNOME] - [termux-reload-settings || true, Trying to reload Termux] + - [bash ./helpers/git-config-features.sh, Setting up optional git-config features]