blob: 49d2cb8b41e1cfec752f67426b9aa4d834bb3106 (
plain) (
blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
;; -*-scheme-*-
;; This is an operating system configuration template for a "bare bones
;; development" setup, with no X11 display server.
;; To build a disk image for a virtual machine, do
;;
;; ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
;; --no-offload gnu/system/examples/devel-hurd.tmpl
;;
;; You may run it like so
;;
;; cp /gnu/store/.../disk-image devel-hurd.img
;; guix shell qemu -- qemu-system-i386 -enable-kvm -m 4096 \
;; -device rtl8139,netdev=net0 \
;; -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
;; -hda devel-hurd.img
;;
;; and use it like
;;
;; ssh -p 10022 root@localhost
;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
;;
;; or even (if you use --image-size=3G)
;;
;; guix build hello
;;
;; Building Guix
;;
;; GUIX_PROFILE=/run/current-system/bootstrap-profile
;; source $GUIX_PROFILE/etc/profile
;; git clone git://git.savannah.gnu.org/guix
;; cd guix
;; ./bootstrap
;; ./configure --localstatedir=/var --sysconfdir=/etc --with-courage
;; make
(use-modules (srfi srfi-1)
(ice-9 match)
(gnu)
(gnu system hurd)
(guix packages)
(guix store))
(use-service-modules ssh virtualization)
(use-package-modules base compression file gawk gdb hurd less m4
package-management ssh version-control)
(define (input->package input)
"Return the INPUT as package, or #f."
(match input
((label (and (? package?) package))
package)
((label (and (? package?) package . output))
(cons package output))
(_ #f)))
(define guix-packages
(filter-map input->package
(fold alist-delete (package-direct-inputs guix)
'("glibc-utf8-locales" "graphviz" "po4a"))))
(define %hurd-devel-os
(operating-system
(inherit %hurd-vm-operating-system)
(host-name "guixydevel")
(timezone "Europe/Berlin")
(file-systems (cons (file-system
(device (file-system-label "hurd"))
(mount-point "/")
(type "ext2"))
%base-file-systems))
(swap-devices (list (swap-space
(target "/swapfile"))))
(users (cons (user-account
(name "guix")
(group "users")
(supplementary-groups '("wheel")))
%base-user-accounts))
(packages (cons*
gdb-minimal
git-minimal
gnu-make
;;(list guix "debug")
m4
openssh-sans-x
(append
guix-packages
%base-packages/hurd)))
(services (cons*
(modify-services (operating-system-user-services
%hurd-vm-operating-system)
(guix-service-type
config =>
(guix-configuration
(inherit config)
(authorized-keys
(cons
(local-file "dezyne.org.pub")
%default-authorized-guix-keys))
(substitute-urls (cons "http://dezyne.org:8181"
%default-substitute-urls)))))))))
%hurd-devel-os
|