aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-21 13:11:52 -0300
committerEuAndreh <eu@euandre.org>2024-08-21 14:51:58 -0300
commit1a746358768cd84eaa32f0066a6791cd8380ad70 (patch)
tree272837745888d5aa7ab412a6d3e063f0b78cacd9
parentmv src/tld.txt src/config/ (diff)
downloadserver-1a746358768cd84eaa32f0066a6791cd8380ad70.tar.gz
server-1a746358768cd84eaa32f0066a6791cd8380ad70.tar.xz
src/config/offsite-ssh.txt: Derive from Makefile and include in /etc/
-rw-r--r--Makefile7
-rw-r--r--src/config/offsite-ssh.txt1
-rw-r--r--src/guix/system.scm9
3 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e3a5e24..1b245a9 100644
--- a/Makefile
+++ b/Makefile
@@ -37,9 +37,12 @@ all: $(derived-assets)
$(derived-assets): Makefile
src/config/tld.txt: Makefile
- echo '$(TLD)' > $@
+ echo '$(TLD)' | ifnew $@
-system.scm.sentinel: src/guix/system.scm src/config/tld.txt
+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
rm -f `basename $@ .sentinel`*
guix build -v3 -r`basename $@ .sentinel` -Kf src/guix/`basename $@ .sentinel`
touch $@
diff --git a/src/config/offsite-ssh.txt b/src/config/offsite-ssh.txt
new file mode 100644
index 0000000..9733a8a
--- /dev/null
+++ b/src/config/offsite-ssh.txt
@@ -0,0 +1 @@
+zh3051@zh3051.rsync.net
diff --git a/src/guix/system.scm b/src/guix/system.scm
index 17028d3..5898531 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -38,6 +38,10 @@
((compose pkg:slurp path)
"src/config/known-hosts.txt"))
+(define +offsite-ssh+
+ ((compose pkg:slurp path)
+ "src/config/offsite-ssh.txt"))
+
(define package-symbols
@@ -134,8 +138,9 @@
(service q:cyrus-sasl-service-type)
(service q:dovecot-service-type)
(service q:internet-postfix-service-type)
- (simple-service 'known-hosts-etc-file etc-service-type
- `(("known_hosts" ,(plain-file "known-hosts.txt" +known-hosts+))))
+ (simple-service 'host-specific-etc-file etc-service-type
+ `(("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")
("eu" "andreh")