summaryrefslogtreecommitdiff
path: root/gnu/system/examples
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <janneke@gnu.org>2020-06-05 09:18:35 +0200
committerJanneke Nieuwenhuizen <janneke@gnu.org>2024-12-03 08:39:01 +0100
commitbd785af9955e8e5054bc6109e4c4e6c17f54b6e0 (patch)
treecbbd05d50296c5c5d13bd4639d558acf993e51cc /gnu/system/examples
parent9e2eae54f9ae06a1ca5873ab81fa4835683db2b9 (diff)
system: examples: Add devel-hurd64.tmpl.
This also updates comments and removes the comment about a very old `bootstrap-profile' hack. * gnu/system/examples/devel-hurd.tmpl (hurd-packages): New variable (%hurd-devel-os): Use it. * gnu/system/examples/devel-hurd64.tmpl: New file. Change-Id: I54b6b0843f0dd635d89cca483ae43d23b20d21e8
Diffstat (limited to 'gnu/system/examples')
-rw-r--r--gnu/system/examples/devel-hurd.tmpl70
-rw-r--r--gnu/system/examples/devel-hurd64.tmpl65
2 files changed, 93 insertions, 42 deletions
diff --git a/gnu/system/examples/devel-hurd.tmpl b/gnu/system/examples/devel-hurd.tmpl
index 3dca0706d1d..066bdfe9d89 100644
--- a/gnu/system/examples/devel-hurd.tmpl
+++ b/gnu/system/examples/devel-hurd.tmpl
@@ -3,7 +3,7 @@
3;; This is an operating system configuration template for a "bare bones 3;; This is an operating system configuration template for a "bare bones
4;; development" setup, with no X11 display server. 4;; development" setup, with no X11 display server.
5 5
6;; To build a disk image for a virtual machine, do 6;; To build a disk image for a virtual machine, do something like:
7;; 7;;
8;; ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \ 8;; ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
9;; --no-offload gnu/system/examples/devel-hurd.tmpl 9;; --no-offload gnu/system/examples/devel-hurd.tmpl
@@ -11,41 +11,38 @@
11;; You may run it like so 11;; You may run it like so
12;; 12;;
13;; cp /gnu/store/.../disk-image devel-hurd.img 13;; cp /gnu/store/.../disk-image devel-hurd.img
14;; guix shell qemu -- qemu-system-i386 -enable-kvm -m 4096 \ 14;; guix shell qemu -- qemu-system-i386 -m 4096 \
15;; -device rtl8139,netdev=net0 \ 15;; --enable-kvm \
16;; -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \ 16;; --device e1000,netdev=net0 \
17;; -hda devel-hurd.img 17;; --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
18;; 18;; --hda devel-hurd.img
19;; and use it like
20;; 19;;
21;; ssh -p 10022 root@localhost 20;; ssh -p 10022 root@localhost
22;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)' 21;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
23;; 22;;
24;; or even (if you use --image-size=3G) 23;; or even:
25;; 24;;
26;; guix build hello 25;; guix build hello
27;; 26;;
28;; Building Guix, do something like: 27;; For Guix hacking, do something like:
29;; 28;;
30;; GUIX_PROFILE=/run/current-system/bootstrap-profile 29;; guix shell --boostrap -D guix
31;; source $GUIX_PROFILE/etc/profile
32;; mkdir -p ~/src/guix 30;; mkdir -p ~/src/guix
33;; cd src/guix 31;; cd src/guix
34;; git clone https://git.savannah.gnu.org/git/guix.git master 32;; git clone https://git.savannah.gnu.org/git/guix.git master
35;; cd master 33;; cd master
36;; ./bootstrap 34;; ./bootstrap
37;; ./configure --with-courage 35;; ./configure
38;; make 36;; make
39 37
38(include "bare-hurd.tmpl")
39
40(use-modules (srfi srfi-1) 40(use-modules (srfi srfi-1)
41 (ice-9 match) 41 (ice-9 match)
42 (gnu)
43 (gnu system hurd) 42 (gnu system hurd)
44 (gnu system locale)
45 (guix packages) 43 (guix packages)
46 (guix store) 44 (guix store))
47 (guix utils)) 45
48(use-service-modules ssh virtualization)
49(use-package-modules base compression file gawk gdb hurd less m4 46(use-package-modules base compression file gawk gdb hurd less m4
50 package-management ssh version-control) 47 package-management ssh version-control)
51 48
@@ -64,23 +61,23 @@
64 ;; These are not essential and do not build yet. 61 ;; These are not essential and do not build yet.
65 '("graphviz" "guile-avahi" "po4a")))) 62 '("graphviz" "guile-avahi" "po4a"))))
66 63
64(define hurd-packages
65 (filter-map input->package
66 (fold alist-delete (package-direct-inputs hurd)
67 ;; These are not essential, rumpkernel is very big.
68 '("dde-sources" "parted" "rumpkernel" "util-linux"
69 "texinfo"))))
70
67(define %hurd-devel-os 71(define %hurd-devel-os
68 (operating-system 72 (operating-system
69 (inherit %hurd-vm-operating-system) 73 (inherit %hurd-os)
70 (host-name "guixydevel") 74 (bootloader (bootloader-configuration
75 (bootloader grub-minimal-bootloader)
76 (targets '("/dev/sdX"))
77 (timeout 0)))
71 (timezone "Europe/Berlin") 78 (timezone "Europe/Berlin")
72 (file-systems (cons (file-system
73 (device (file-system-label "hurd"))
74 (mount-point "/")
75 (type "ext2"))
76 %base-file-systems))
77 (swap-devices (list (swap-space 79 (swap-devices (list (swap-space
78 (target "/swapfile")))) 80 (target "/swapfile"))))
79 (users (cons (user-account
80 (name "guix")
81 (group "users")
82 (supplementary-groups '("wheel")))
83 %base-user-accounts))
84 (packages (cons* 81 (packages (cons*
85 gdb-minimal 82 gdb-minimal
86 git-minimal 83 git-minimal
@@ -89,18 +86,7 @@
89 openssh-sans-x 86 openssh-sans-x
90 (append 87 (append
91 guix-packages 88 guix-packages
92 %base-packages/hurd))) 89 hurd-packages
93 (services (cons* 90 %base-packages/hurd)))))
94 (modify-services (operating-system-user-services
95 %hurd-vm-operating-system)
96 (openssh-service-type
97 config =>
98 ;; Set wide open
99 (openssh-configuration
100 (openssh openssh-sans-x)
101 (port-number 2222)
102 (permit-root-login #t)
103 (allow-empty-passwords? #t)
104 (password-authentication? #t))))))))
105 91
106%hurd-devel-os 92%hurd-devel-os
diff --git a/gnu/system/examples/devel-hurd64.tmpl b/gnu/system/examples/devel-hurd64.tmpl
new file mode 100644
index 00000000000..146a35adcfc
--- /dev/null
+++ b/gnu/system/examples/devel-hurd64.tmpl
@@ -0,0 +1,65 @@
1;; -*-scheme-*-
2
3;; This is an operating system configuration template
4;; for a "bare bones" QEMU setup, with no X11 display server.
5
6;; To build a disk image for a virtual machine, do:
7;;
8;; ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
9;; --no-offload gnu/system/examples/devel-hurd64.tmpl
10;;
11;; You may run it like so:
12;;
13;; cp /gnu/store/.../disk-image devel-hurd.img
14;; guix shell qemu@7 -- qemu-system-x86_64 -m 4096 \
15;; --machine q35 \
16;; --enable-kvm \
17;; --device e1000,netdev=net0 \
18;; --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
19;; --hda devel-hurd.img
20;;
21;; and use it like:
22;;
23;; ssh -p 10022 root@localhost
24;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
25;;
26;; or even:
27;;
28;; guix build hello
29;;
30;; For Guix hacking, do something like:
31;;
32;; guix shell --boostrap -D guix
33;; mkdir -p ~/src/guix
34;; cd src/guix
35;; git clone git clone git://git.savannah.gnu.org/guix
36;; cd master
37;; ./bootstrap
38;; ./configure
39;; make
40
41(include "devel-hurd.tmpl")
42(include "bare-hurd64.tmpl")
43
44(define %hurd64-devel-os
45 (operating-system
46 (inherit %hurd64-os)
47 (bootloader (bootloader-configuration
48 (bootloader grub-minimal-bootloader)
49 (targets '("/dev/sdX"))
50 (timeout 0)))
51 (timezone "Europe/Berlin")
52 (swap-devices (list (swap-space
53 (target "/swapfile"))))
54 (packages (cons*
55 gdb-minimal-15
56 git-minimal
57 gnu-make
58 m4
59 openssh-sans-x
60 (append
61 guix-packages
62 hurd-packages
63 %base-packages/hurd)))))
64
65%hurd64-devel-os