summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-23 19:12:56 -0300
committerEuAndreh <eu@euandre.org>2024-08-23 19:12:56 -0300
commitb3fd82d5442b04ebc2c9ef6cfbdf98e25969cfb6 (patch)
tree5a77ee7de160f723a10d69f019d75050897e31d6
parentsystem.scm: Uncomment other golang services (diff)
downloadasami-b3fd82d5442b04ebc2c9ef6cfbdf98e25969cfb6.tar.gz
asami-b3fd82d5442b04ebc2c9ef6cfbdf98e25969cfb6.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.scm29
3 files changed, 14 insertions, 17 deletions
diff --git a/src/config/ipv4.txt b/src/config/ipv4.txt
new file mode 100644
index 0000000..1295945
--- /dev/null
+++ b/src/config/ipv4.txt
@@ -0,0 +1 @@
+216.238.73.1
diff --git a/src/config/ipv6.txt b/src/config/ipv6.txt
new file mode 100644
index 0000000..806d04d
--- /dev/null
+++ b/src/config/ipv6.txt
@@ -0,0 +1 @@
+2001:19f0:b400:1582:5400:04ff:fea9:370e
diff --git a/src/guix/system.scm b/src/guix/system.scm
index ba9426b..d14e24c 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -57,28 +57,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+
`(("andre" "EuAndreh" ("wheel") ,(path "src/keys/SSH/andre.pub.txt"))))
-(define +ipv4+ "216.238.73.1")
-(define +ipv6+ "2001:19f0:b400:1582:5400:04ff:fea9:370e")
-(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 +offsite-ssh+
- ((compose pkg:slurp path)
- "src/config/offsite-ssh.txt"))
+(define file (compose string-trim-right pkg:slurp path))
+
+(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"))
(define +cert.pem+ (pkg:str "/etc/letsencrypt/live/" +tld+ "/cert.pem"))
(define +privkey.pem+ (pkg:str "/etc/letsencrypt/live/" +tld+ "/privkey.pem"))