aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/examples/devel-hurd.tmpl
blob: 066bdfe9d89d621a8c3439c1ff3c10d6b9bde3bc (about) (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
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
;; -*-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 something like:
;;
;;   ./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 -m 4096                \
;;       --enable-kvm                                             \
;;       --device e1000,netdev=net0                               \
;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
;;       --hda devel-hurd.img
;;
;;     ssh -p 10022 root@localhost
;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
;;
;; or even:
;;
;;     guix build hello
;;
;; For Guix hacking, do something like:
;;
;;     guix shell --boostrap -D guix
;;     mkdir -p ~/src/guix
;;     cd src/guix
;;     git clone https://git.savannah.gnu.org/git/guix.git master
;;     cd master
;;     ./bootstrap
;;     ./configure
;;     make

(include "bare-hurd.tmpl")

(use-modules (srfi srfi-1)
             (ice-9 match)
             (gnu system hurd)
             (guix packages)
             (guix store))

(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)
                    ;; These are not essential and do not build yet.
                    '("graphviz" "guile-avahi" "po4a"))))

(define hurd-packages
  (filter-map input->package
              (fold alist-delete (package-direct-inputs hurd)
                    ;; These are not essential, rumpkernel is very big.
                    '("dde-sources" "parted" "rumpkernel" "util-linux"
                      "texinfo"))))

(define %hurd-devel-os
  (operating-system
    (inherit %hurd-os)
    (bootloader (bootloader-configuration
                 (bootloader grub-minimal-bootloader)
                 (targets '("/dev/sdX"))
                 (timeout 0)))
    (timezone "Europe/Berlin")
    (swap-devices (list (swap-space
                          (target "/swapfile"))))
    (packages (cons*
               gdb-minimal
               git-minimal
               gnu-make
               m4
               openssh-sans-x
               (append
                guix-packages
                hurd-packages
                %base-packages/hurd)))))

%hurd-devel-os
-05-25 15:34:47 +0200'>2024-05-25gnu: docker: Allow setting Shepherd dependencies in oci-container-configuration....* gnu/services/docker.scm (oci-container-configuration) [requirement]: New field; (list-of-symbols): sanitize it; (oci-container-shepherd-service): use it. * doc/guix.texi: Document it. Change-Id: Ic0ba336a2257d6ef7c658cfc6cd630116661f581 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2024-05-25gnu: docker: Allow setting host environment variables in oci-container-config......* gnu/services/docker.scm (oci-container-configuration) [host-environment]: New field; (oci-sanitize-host-environment): sanitize it; (oci-container-shepherd-service): use it. * doc/guix.texi: Document it. Change-Id: I4d54d37736cf09f042a71cb0b6e673abc0948d9c Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2024-05-25gnu: docker: Provide escape hatch in oci-container-configuration....* gnu/services/docker.scm (exports): Add missing procedures; (oci-container-service-type)[description]: Docker and OCI images should mean the same thing; (oci-container-configuration): clarify field types; [extra-arguments]: new field; (oci-sanitize-extra-arguments): sanitize it; (oci-container-shepherd-service): use it. * doc/guix.texi: Document it. Change-Id: I64e9d82c8ae538d59d1c482f23070a880156ddf7 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2024-01-03services: docker: Add config-file option....* gnu/services/docker.scm (docker-configuration)[config-file] Add file-like field. * doc/guix.texi (Docker Service): Add information about config-file. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Connor Clark 2023-12-10services: Fix oci-container-service-type container user....The oci-container-configuration supports two user fields: one is the user, from the host system, under whose authority the OCI-backed Shepherd service is run; the other is an optional user/UID that can be passed to the docker run invokation to override the user defined in the OCI image. The user from the host system is incorrectly passed to docker run command, this patches reverts the incorrect behavior and passes the correct container-user field value. * gnu/services/docker.scm (oci-container-configuration): Fix the user passed to the docker run invokation. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2023-11-23services: Add oci-container-service-type....* gnu/services/docker.scm (oci-container-configuration): New variable; (oci-container-shepherd-service): new variable; (oci-container-service-type): new variable. * doc/guix.texi (Miscellaneous Services): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I17cede1975051a9fdd0e0a13b2191d8055266f80 Giacomo Leidi 2023-08-08file-systems: Use cgroups v2....cgroup v2 is the next generation of the control groups API. This patch replaces the cgroup v1 file systems with the unified cgroup v2 file system. cgroup v2 allows for things like containerd/podman to run rootless containers and opens guix system up to running things like Kubernetes. Thanks to Hilton Chain <hako@ultrarare.space> for suggesting the Docker service change. * gnu/system/file-systems.scm (%control-groups): Change to a single "cgroup2" mount point. * gnu/services/docker.scm (docker-shepherd-service): Trim 'requirement' field accordingly. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Sam Lockart 2022-07-13services: docker: Fix race condition....Fixes <https://issues.guix.gnu.org/38432>. * gnu/packages/patches/containerd-create-pid-file.patch: New file. * gnu/local.mk (dist_patch_DATA): Add this. * gnu/packages/docker.scm (containerd)[source]: Add this patch. * gnu/services/docker.scm (containerd-shepherd-service): Add #:pid-file and #:pid-file-timeout. * gnu/services/docker.scm (docker-shepherd-service): Add --containerd flag. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Oleg Pykhalov