aboutsummaryrefslogtreecommitdiff
path: root/services/gn-guile.scm
diff options
context:
space:
mode:
authorPjotr Prins2023-09-24 14:49:53 -0500
committerPjotr Prins2023-12-21 15:27:40 +0100
commit93ff9ed6fd9f2ca15cf6a8930eae26c9f5c65450 (patch)
tree8948c3342e864bf34a6952798f4edff872b80be5 /services/gn-guile.scm
parent6ecd161175a0ec0b1e4faa51ce2bb9e2be7d06e1 (diff)
downloadgn-machines-93ff9ed6fd9f2ca15cf6a8930eae26c9f5c65450.tar.gz
Simple gn-guile system container builds
Diffstat (limited to 'services/gn-guile.scm')
-rw-r--r--services/gn-guile.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/services/gn-guile.scm b/services/gn-guile.scm
new file mode 100644
index 0000000..2f675a8
--- /dev/null
+++ b/services/gn-guile.scm
@@ -0,0 +1,52 @@
+;; This is an example definition for the gn-guile/GN4 service
+;;
+;; Run with
+;;
+;; export runner=$(guix system container gn-guile.scm)
+;;
+;; as root
+;;
+;; sudo bash -c $runner
+;; echo $runner
+;;
+;; make a note of pid and
+;;
+;; sudo bash -c "nsenter -a -t 4050285"
+;;
+;; now you should be inside the container (note bash should be in the container!)
+
+(use-modules (gnu)
+ (guix records)
+ (forge utils))
+
+(define-record-type* <gn-guile-configuration>
+ gn-guile-configuration make-gn-guile-configuration
+ gn-guile-configuration?
+ (gn2-repository gn-guile-configuration-gn2-repository
+ (default "https://github.com/genenetwork/genenetwork2"))
+ (gn2-port gn-guile-configuration-gn2-port
+ (default 8082)))
+
+
+(define gn-guile-service-type
+ (service-type
+ (name 'gn-guile)
+ (description "gn-guile/GN4 webservice")
+ (extensions '())
+ ))
+
+(operating-system
+ (host-name "gn-guile")
+ (timezone "UTC")
+ (locale "en_US.utf8")
+ (bootloader (bootloader-configuration
+ (bootloader grub-bootloader)
+ (targets (list "/dev/sdX"))))
+ (file-systems %base-file-systems)
+ (users %base-user-accounts)
+ (packages %base-packages)
+
+ (services (cons
+ (service gn-guile-service-type
+ (gn-guile-configuration))
+ %base-services)))