summaryrefslogtreecommitdiff
path: root/src/guix/system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/guix/system.scm')
-rw-r--r--src/guix/system.scm32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/guix/system.scm b/src/guix/system.scm
index 717f721..2b08870 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -25,11 +25,26 @@
(heredoc:enable-syntax)
+(define +ipv4+ "216.238.73.1")
+(define +ipv6+ "2001:19f0:b400:1582:5400:04ff:fea9:370e")
+
+(define +users+
+ '(("andre" "EuAndreh" ("wheel" "become-deployer" "become-secrets-keeper"))
+ ("laisse" "Laísses" ())))
+
+
(define +working-dir+
(if (directory-exists? "/opt/deploy/current")
"/opt/deploy/current"
(canonicalize-path ".")))
+(add-to-load-path
+ (string-append +working-dir+ "/src/guix"))
+(use-modules
+ ((packages) #:prefix packages:)
+ ((services) #:prefix services:))
+
+
(define (str . rest)
(apply string-append rest))
@@ -51,12 +66,6 @@
(string-trim-right
(file "src/config/tld.txt")))
-(define +ipv4+ "216.238.73.1")
-(define +ipv6+ "2001:19f0:b400:1582:5400:04ff:fea9:370e")
-
-(define +users+
- '(("andre" "EuAndreh" ("wheel" "become-deployer" "become-secrets-keeper"))
- ("laisse" "Laísses" ())))
(define +user-accounts+
(map (lambda (user)
@@ -220,6 +229,12 @@
(mail mail)
(entries ipv6-reverse-domain-zone))))))
+(define private-http
+ '(#"-
+ auth_basic "Private area";
+ auth_basic_user_file /opt/secrets/htpasswd.txt;
+ "#))
+
(operating-system
(locale "en_GB.UTF-8")
@@ -387,7 +402,8 @@
(uri "/api/")
(body
(list
-#;
+ ;; FIXME: use this for blue/green deployment
+ #;
(fmt "include /var/run/~a/curr.conf;~%" +tld+))))
(nginx-location-configuration
(uri "/git/static/")
@@ -439,7 +455,7 @@
mailbox_size_limit = 5120000000
"#)))
(service mail-aliases-service-type
- `(("root" "andre")
+ `(("root" "andre")
("support" ,@(map s1:first +users+)))))
(modify-services %base-services
(rottlog-service-type config =>