From 251a766b0f81c1569873ec4cb536428e08b16ed7 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 31 Oct 2022 20:22:43 -0300 Subject: etc/ssh/config: Generate with envsubst So that the `Include` can also point to a variable. --- Makefile | 4 ++++ etc/ssh/config | 6 ------ etc/ssh/config.tmpl | 6 ++++++ 3 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 etc/ssh/config create mode 100644 etc/ssh/config.tmpl diff --git a/Makefile b/Makefile index 26958ad..9ab6cb1 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ derived-assets = \ $(XDG_CONFIG_HOME)/ssh/id_rsa.pub \ $(XDG_CONFIG_HOME)/git/config-extra \ $(XDG_CONFIG_HOME)/gnupg/gpg-agent.conf \ + $(XDG_CONFIG_HOME)/ssh/config \ $(XDG_CONFIG_HOME)/alot/config \ $(XDG_CONFIG_HOME)/mbsync/config \ $(XDG_CONFIG_HOME)/msmtp/config \ @@ -58,6 +59,9 @@ $(XDG_CONFIG_HOME)/ssh/id_rsa.pub: gpg --export-ssh-key eu@euandre.org > $@ chmod 600 $@ +$(XDG_CONFIG_HOME)/ssh/config: $(XDG_CONFIG_HOME)/ssh/config.tmpl + envsubst < $(XDG_CONFIG_HOME)/ssh/config.tmpl > $@ + $(XDG_CONFIG_HOME)/git/config-extra: printf '[sendemail]\n smtpserver = ' > $@ command -v msmtpq >> $@ diff --git a/etc/ssh/config b/etc/ssh/config deleted file mode 100644 index e548fe2..0000000 --- a/etc/ssh/config +++ /dev/null @@ -1,6 +0,0 @@ -Host * - UserKnownHostsFile ${XDG_CONFIG_HOME}/ssh/known_hosts - -Include ~/dev/libre/servers/src/infrastructure/ssh.conf -Include ~/dev/others/lawtech/src/infrastructure/ssh.conf -Include ~/.usr/share/euandreh/vm-ssh.conf diff --git a/etc/ssh/config.tmpl b/etc/ssh/config.tmpl new file mode 100644 index 0000000..fd4b8a3 --- /dev/null +++ b/etc/ssh/config.tmpl @@ -0,0 +1,6 @@ +Host * + UserKnownHostsFile ${XDG_CONFIG_HOME}/ssh/known_hosts + +Include ~/dev/libre/servers/src/infrastructure/ssh.conf +Include ~/dev/others/lawtech/src/infrastructure/ssh.conf +Include ${XDG_DATA_HOME}/euandreh/vm-ssh.conf -- cgit v1.2.3