aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-24 15:47:52 -0300
committerEuAndreh <eu@euandre.org>2024-08-24 15:47:52 -0300
commit00c330f2d502139faab40b8b08bbdea95d99e418 (patch)
tree4f84c3650e90d0cdc96017e391ea1d01a9edf25b
parentsrc/secrets/repo/wireguard-private-key.txt.gpg: Add from server (diff)
downloadserver-00c330f2d502139faab40b8b08bbdea95d99e418.tar.gz
server-00c330f2d502139faab40b8b08bbdea95d99e418.tar.xz
Re-include "id_rsa.pub" in /etc/
-rw-r--r--Makefile10
-rw-r--r--src/config/root-pubkey.txt1
-rw-r--r--src/guix/system.scm4
3 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index dcfb758..afcde05 100644
--- a/Makefile
+++ b/Makefile
@@ -42,16 +42,14 @@ src/config/tld.txt: Makefile
src/config/offsite-ssh.txt: Makefile
echo '$(OFFSITE_SSH)' | ifnew $@
-system.scm.sentinel: src/guix/system.scm src/config/tld.txt src/config/offsite-ssh.txt
+src/config/root-pubkey.txt: src/keys/SSH/root@$(TLD).id_rsa.pub.txt Makefile
+ cut -d' ' -f8- < src/keys/SSH/root@$(TLD).id_rsa.pub.txt > $@
+
+system.scm.sentinel: src/guix/system.scm src/config/tld.txt src/config/offsite-ssh.txt src/config/root-pubkey.txt
rm -f system.scm*
guix build -v3 -r system.scm -Kf src/guix/system.scm
touch $@
-.SUFFIXES: .stripped
-src/keys/SSH/root@$(TLD).id_rsa.pub.stripped: \
- src/keys/SSH/root@$(TLD).id_rsa.pub.txt
- cut -d' ' -f8- < $*.txt > $@
-
check-unit:
diff --git a/src/config/root-pubkey.txt b/src/config/root-pubkey.txt
new file mode 100644
index 0000000..4a715ff
--- /dev/null
+++ b/src/config/root-pubkey.txt
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC0o73ml7gMPhw/EwjIof6ph5PHPAL5EFDrP7PPZ9xCES79nSKZ0r40uW2RNp2Gzwb/QYtbr/aFkuX11Eo739upnj5cydyr4AHPLgoBoPVbn7/0/IIkin4r31GrWYdGzXRZSB5Tz0Za58OYW0RiUVHffx/E5+tOBQ2SMc6WK9/Q6FljGrD3yK/KYgZhcvmfsDTv2DGhFFORoUQSfGGwmRMJXGVPG2lDqoD3I3CWF34Y/b9GRHdSFgHy3iOas03WTsMaOSosmuF9MMm8Zn2515XGXU+uirsUJrFOa5leRBEvoEmx+WsB6CULn0PKk+ieghcq8z4j5oR1AOUFeSSJVIvlOyyt8x5rqLW8CvPFtU982LZrAq/DCcuaIkx/ww/cIbkUIN52Tv1Ia8jfV2aqRJ4hRshsuh9mj5fUlp+jmrMY6Ww5tl24OKrKRAT6pr5Fzgip927BkLPKJFClcp5fzZJLUiwNihYfuR5J+VselMPfxoTXfNVj/hsINclj2CLoCTM= root@toph
diff --git a/src/guix/system.scm b/src/guix/system.scm
index 6185939..efdc69a 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -34,6 +34,7 @@
(define +ipv4+ (file "src/config/ipv4.txt"))
(define +ipv6+ (file "src/config/ipv6.txt"))
(define +tld+ (file "src/config/tld.txt"))
+(define +root-pubkey+ (file "src/config/root-pubkey.txt"))
(define +known-hosts+ (file "src/config/known-hosts.txt"))
(define +offsite-ssh+ (file "src/config/offsite-ssh.txt"))
@@ -135,7 +136,8 @@
(service q:dovecot-service-type)
(service q:internet-postfix-service-type)
(simple-service 'host-specific-etc-file etc-service-type
- `(("known_hosts" ,(plain-file "known-hosts.txt" +known-hosts+))
+ `(("id_rsa.pub" ,(plain-file "id_rsa.pub" +root-pubkey+))
+ ("known_hosts" ,(plain-file "known-hosts.txt" +known-hosts+))
("offsite-ssh.txt" ,(plain-file "offsite-ssh.txt" +offsite-ssh+))))
(service mail-aliases-service-type
'(("root" "andreh")