diff options
author | EuAndreh <eu@euandre.org> | 2022-03-28 14:14:02 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-03-28 14:14:11 -0300 |
commit | 79aefb4b8a9f194346d07c93aacd5a581b11d89f (patch) | |
tree | c815fb04789e68e29f936b2721cb5aa188c5a9f2 /src/infrastructure/machines.scm | |
parent | TODOs.md: Add #td-1f71cdc9-374f-4e2a-bbd0-034bd12e9685 (diff) | |
download | toph-79aefb4b8a9f194346d07c93aacd5a581b11d89f.tar.gz toph-79aefb4b8a9f194346d07c93aacd5a581b11d89f.tar.xz |
src/infrastructure/machines.scm: Use "suyin" remote alias in new ssh.conf file
Diffstat (limited to 'src/infrastructure/machines.scm')
-rw-r--r-- | src/infrastructure/machines.scm | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/src/infrastructure/machines.scm b/src/infrastructure/machines.scm index 93baec5..a45bec4 100644 --- a/src/infrastructure/machines.scm +++ b/src/infrastructure/machines.scm @@ -23,10 +23,10 @@ ;; - create the SSH key ;; $ ssh-keygen ;; - *manually* add that to the authorized_keys on rsync.net: -;; $ scp $R:.ssh/authorized_keys src/rsync.net/ +;; $ scp suyin:.ssh/authorized_keys src/rsync.net/ ;; $ # add 'restrict,command="..."' to the authorized_keys entry ;; $ ssh $SERVER cat .ssh/id_rsa.pub >> authorized_keys -;; $ scp src/rsync.net/authorized_keys $R:.ssh/ +;; $ scp src/rsync.net/authorized_keys suyin:.ssh/ ;; - copy borg key after the first backup: ;; $ ? ;; - generate DKIM key @@ -37,9 +37,18 @@ ;; +(define ssh.conf #"""- + ClientAliveInterval 30 + ClientAliveCountMax 20 + MaxSessions 20 + + Host suyin + HostName ch-s010.rsync.net + User 16686 + """#) + (define profile-extra (plain-file "profile-extra" #"""- - R='16686@ch-s010.rsync.net' export BORG_REMOTE_PATH='borg1' export BORG_PASSPHRASE_FD='/opt/secrets/borg-passphrase.txt' """#)) @@ -48,6 +57,8 @@ (plain-file "bashrc-extra" #"""- alias l='ls -lahF --color' alias info='info --init-file /etc/infokey' + + export EDITOR=vi """#)) (define ps1.sh @@ -148,24 +159,24 @@ } trap finish EXIT - borg init -e repokey-blake2 "$R:toph-borg" ||: - borg key export "$R:toph-borg" /opt/secrets/borg-key.txt + borg init -e repokey-blake2 suyin:borg/toph ||: + borg key export suyin:borg/toph /opt/secrets/borg-key.txt borg create \ - --exclude /root/.cache/ \ - --stats \ - --compression lzma,9 \ - "R$:toph-borg::{hostname}-{now}-${1:-cronjob}" \ - /root/ \ - /home/ \ - /etc/letsencrypt/ \ - /var/lib/certbot/ \ - /var/lib/letsencrypt \ + --exclude /root/.cache/ \ + --stats \ + --compression lzma,9 \ + suyin:borg/toph::{hostname}-{now}-${1:-cronjob}" \ + /root/ \ + /home/ \ + /etc/letsencrypt/ \ + /var/lib/certbot/ \ + /var/lib/letsencrypt \ /opt/ borg check \ --verbose \ - "$R:toph-borg" + suyin:borg/toph borg prune \ --verbose \ @@ -173,7 +184,7 @@ --keep-within=6m \ --keep-weekly=52 \ --keep-monthly=24 \ - "$R:toph-borg" + suyin:borg/toph """#)) (define vi.exrc @@ -281,11 +292,7 @@ (subsystems '()) (log-level 'verbose) (authorized-keys authorized-keys) - (extra-content #"""- - ClientAliveInterval 30 - ClientAliveCountMax 20 - MaxSessions 20 - """#))) + (extra-content ssh.conf))) (service dhcp-client-service-type) (service mcron-service-type (mcron-configuration |