blob: 2f675a83d2bbd633e1ae231a1d35273d96bfcd11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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)))
|