diff --git a/.chezmoiignore b/.chezmoiignore new file mode 100644 index 0000000..5be9bba --- /dev/null +++ b/.chezmoiignore @@ -0,0 +1,14 @@ +{{- if ne .include_ssh_keys "true" }} +.config/bash/gitea.sh +.ssh/gitea +.ssh/gitea.pub +.ssh/selfhosted +.ssh/selfhosted.pub +.ssh/github +.ssh/github.pub +{{- end }} +{{- if ne .chezmoi.os "linux" }} +.config/bash/ssh-agent.sh +.config/bash/xhost.sh +.config/systemd/ +{{- end }} diff --git a/dot_config/bash/ssh-agent.sh.tmpl b/dot_config/bash/ssh-agent.sh.tmpl index 8f526ae..ddf4cd0 100644 --- a/dot_config/bash/ssh-agent.sh.tmpl +++ b/dot_config/bash/ssh-agent.sh.tmpl @@ -1,4 +1,3 @@ -{{- if (eq .chezmoi.os "linux") -}} {{- if (contains "microsoft" .chezmoi.kernel.osrelease) -}} if [ -z "$(pgrep ssh-agent)" ]; then rm -rf /tmp/ssh-* @@ -11,4 +10,3 @@ fi SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export SSH_AUTH_SOCK {{ end }} -{{- end -}} diff --git a/dot_config/bash/xhost.sh.tmpl b/dot_config/bash/xhost.sh.tmpl index 0b795ea..40c4688 100644 --- a/dot_config/bash/xhost.sh.tmpl +++ b/dot_config/bash/xhost.sh.tmpl @@ -1,3 +1 @@ -{{ if (eq .chezmoi.os "linux" ) }} xhost +local:root > /dev/null 2>&1 -{{ end }} diff --git a/dot_config/systemd/user/ssh-agent.service.tmpl b/dot_config/systemd/user/ssh-agent.service.tmpl index 6a7cc77..5c59cbf 100644 --- a/dot_config/systemd/user/ssh-agent.service.tmpl +++ b/dot_config/systemd/user/ssh-agent.service.tmpl @@ -1,4 +1,3 @@ -{{- if (eq .chezmoi.os "linux") -}} [Unit] Description=SSH key agent @@ -11,4 +10,3 @@ ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK [Install] WantedBy=default.target -{{ end }} diff --git a/private_dot_ssh/private_authorized_keys.tmpl b/private_dot_ssh/private_authorized_keys.tmpl index 46f3287..fadb7b7 100644 --- a/private_dot_ssh/private_authorized_keys.tmpl +++ b/private_dot_ssh/private_authorized_keys.tmpl @@ -1 +1,3 @@ -{{- bitwardenAttachment "selfhosted.pub" "selfhosted-ssh-keys" }} +{{- if ne .include_ssh_keys "true" }} +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID3M8FYKBjXXUQpk5+bQXe1zwkONtfbifRnTr+dkNwHt selfhosted@penguincoder.org +{{- end }} diff --git a/private_dot_ssh/private_config.tmpl b/private_dot_ssh/private_config.tmpl index 731e5a5..21e4df2 100644 --- a/private_dot_ssh/private_config.tmpl +++ b/private_dot_ssh/private_config.tmpl @@ -4,7 +4,6 @@ Host * Host penguincoder.org Port 2223 - User {{ (bitwardenFields "item" "selfhosted-ssh-keys").hydrogen_username.value }} IdentityFile ~/.ssh/selfhosted Host git.penguincoder.org @@ -13,16 +12,10 @@ Host git.penguincoder.org IdentityFile ~/.ssh/gitea ProxyCommand none -Host helium.penguincoder.org helium - User {{ (bitwardenFields "item" "selfhosted-ssh-keys").hydrogen_username.value }} +Host helium helium.penguincoder.org HostName 192.168.1.50 -Host hydrogen hydrogen.olympus - User {{ (bitwardenFields "item" "selfhosted-ssh-keys").hydrogen_username.value }} - HostName 192.168.1.80 - -Host potassium potassium.olympus - User {{ (bitwardenFields "item" "selfhosted-ssh-keys").hydrogen_username.value }} +Host potassium potassium.penguincoder.org HostName 192.168.1.60 ProxyCommand none @@ -33,9 +26,3 @@ Host *.penguincoder.org !git.penguincoder.org Host github.com User git IdentityFile ~/.ssh/github - -Host jolijardin.co - User {{ (bitwardenFields "item" "jolijardin.co").username.value }} - PubKeyAuthentication no - # {{ (bitwardenFields "item" "jolijardin.co").password.value }} -