aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-23 19:35:07 -0300
committerEuAndreh <eu@euandre.org>2024-08-23 19:35:07 -0300
commit3900e9aa8f6d0d7fd1df2294d255f2b23543e43c (patch)
tree774bcb645206819acbf30d24b139ef473beebb82
parentsystem.scm: Add 8GiB /swapfile (diff)
downloadserver-3900e9aa8f6d0d7fd1df2294d255f2b23543e43c.tar.gz
server-3900e9aa8f6d0d7fd1df2294d255f2b23543e43c.tar.xz
Move IPs to src/config/ipv{4,6}.txt
-rw-r--r--src/config/ipv4.txt1
-rw-r--r--src/config/ipv6.txt1
-rw-r--r--src/guix/system.scm27
3 files changed, 13 insertions, 16 deletions
diff --git a/src/config/ipv4.txt b/src/config/ipv4.txt
new file mode 100644
index 0000000..7e4fa91
--- /dev/null
+++ b/src/config/ipv4.txt
@@ -0,0 +1 @@
+216.238.68.100
diff --git a/src/config/ipv6.txt b/src/config/ipv6.txt
new file mode 100644
index 0000000..628e143
--- /dev/null
+++ b/src/config/ipv6.txt
@@ -0,0 +1 @@
+2001:19f0:b400:1f0c:5400:04ff:fe35:8c89
diff --git a/src/guix/system.scm b/src/guix/system.scm
index 3a78ddc..a1f72f8 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -19,28 +19,23 @@
-(define (path s)
+(define +working-dir+
;; src/guix/system.scm + ../../../ = ./
- (pkg:str (dirname (dirname (dirname (current-filename)))) "/" s))
+ (dirname (dirname (dirname (current-filename)))))
+
+(define (path s)
+ (pkg:str +working-dir+ "/" s))
(define +users+
`(("andreh" "EuAndreh" ("wheel") ,(path "src/keys/SSH/andreh.pub.txt"))))
-(define +ipv4+ "216.238.68.100")
-(define +ipv6+ "2001:19f0:b400:1f0c:5400:04ff:fe35:8c89")
-(define +tld+
- ((compose string-trim-right
- pkg:slurp
- path)
- "src/config/tld.txt"))
-
-(define +known-hosts+
- ((compose pkg:slurp path)
- "src/config/known-hosts.txt"))
+(define file (compose string-trim-right pkg:slurp path))
-(define +offsite-ssh+
- ((compose pkg:slurp path)
- "src/config/offsite-ssh.txt"))
+(define +ipv4+ (file "src/config/ipv4.txt"))
+(define +ipv6+ (file "src/config/ipv6.txt"))
+(define +tld+ (file "src/config/tld.txt"))
+(define +known-hosts+ (file "src/config/known-hosts.txt"))
+(define +offsite-ssh+ (file "src/config/offsite-ssh.txt"))