aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/examples/vm-image.tmpl
blob: bcb2ba614c022593424a9c349f5fe9bcaa0f810e (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
93
94
95
96
97
98
99
100
101
102
103
104
105
;; This is an operating system configuration for a VM image.
;; Modify it as you see fit and instantiate the changes by running:
;;
;;   guix system reconfigure /etc/config.scm
;;

(use-modules (gnu) (guix) (srfi srfi-1))
(use-service-modules desktop networking ssh xorg)
(use-package-modules bootloaders certs fonts nvi
                     package-management wget xorg)

(define vm-image-motd (plain-file "motd" "
\x1b[1;37mThis is the GNU system.  Welcome!\x1b[0m

This instance of Guix is a template for virtualized environments.
You can reconfigure the whole system by adjusting /etc/config.scm
and running:

  guix system reconfigure /etc/config.scm

Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation.

\x1b[1;33mConsider setting a password for the 'root' and 'guest' \
accounts.\x1b[0m
"))

(operating-system
  (host-name "gnu")
  (timezone "Etc/UTC")
  (locale "en_US.utf8")
  (keyboard-layout (keyboard-layout "us" "altgr-intl"))

  ;; Label for the GRUB boot menu.
  (label (string-append "GNU Guix " (package-version guix)))

  (firmware '())

  ;; Below we assume /dev/vda is the VM's hard disk.
  ;; Adjust as needed.
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (target "/dev/vda")
               (terminal-outputs '(console))))
  (file-systems (cons (file-system
                        (mount-point "/")
                        (device "/dev/vda1")
                        (type "ext4"))
                      %base-file-systems))

  (users (cons (user-account
                (name "guest")
                (comment "GNU Guix Live")
                (password "")                     ;no password
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video")))
               %base-user-accounts))

  ;; Our /etc/sudoers file.  Since 'guest' initially has an empty password,
  ;; allow for password-less sudo.
  (sudoers-file (plain-file "sudoers" "\
root ALL=(ALL) ALL
%wheel ALL=NOPASSWD: ALL\n"))

  (packages (append (list font-bitstream-vera nss-certs nvi wget)
                    %base-packages))

  (services
   (append (list (service xfce-desktop-service-type)

                 ;; Choose SLiM, which is lighter than the default GDM.
                 (service slim-service-type
                          (slim-configuration
                           (auto-login? #t)
                           (default-user "guest")
                           (xorg-configuration
                            (xorg-configuration
                             (keyboard-layout keyboard-layout)))))

                 ;; Uncomment the line below to add an SSH server.
                 ;;(service openssh-service-type)

                 ;; Use the DHCP client service rather than NetworkManager.
                 (service dhcp-client-service-type))

           ;; Remove GDM, ModemManager, NetworkManager, and wpa-supplicant,
           ;; which don't make sense in a VM.
           (remove (lambda (service)
                     (let ((type (service-kind service)))
                       (or (memq type
                                 (list gdm-service-type
                                       wpa-supplicant-service-type
                                       cups-pk-helper-service-type
                                       network-manager-service-type
                                       modem-manager-service-type))
                           (eq? 'network-manager-applet
                                (service-type-name type)))))
                   (modify-services %desktop-services
                     (login-service-type config =>
                                         (login-configuration
                                          (inherit config)
                                          (motd vm-image-motd)))))))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))
href='/guix/commit/gnu/packages/lisp-xyz.scm?id=209cdc81fd0c671f622cead5ee242938d1e48bea'>gnu: cl-gobject-introspection: Update to 0.3-3.83beec4....* gnu/packages/lisp-xyz.scm (sbcl-cl-gobject-introspection): Update to 0.3-3.83beec4. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-09-04gnu: cl-cl+ssl: Update to 0.0.0-6.17d5cdd....* gnu/packages/lisp-xyz.scm (sbcl-cl+ssl): Update to 0.0.0-6.17d5cdd. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-09-04gnu: cl-iolib: Update to 0.8.4-0.010b7a6....* gnu/packages/lisp-xyz.scm (sbcl-iolib): Update to 0.8.4.0.010b7a6. [native-inputs]: Add pkg-config and sbcl-fiveam. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-09-02gnu: sbcl-njson: Update to 1.1.1....* gnu/packages/lisp-xyz.scm (sbcl-json): Update to 1.1.1. [description]: Update description. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Artyom Bologov 2023-09-13gnu: cl-nasdf: Update to 0.1.8....* gnu/packages/lisp-xyz.scm (sbcl-nasdf): Update to 0.1.8. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-09-13gnu: cl-njson: Update to 1.2.0....* gnu/packages/lisp-xyz.scm (sbcl-njson): Update to 1.2.0. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Artyom Bologov 2023-08-22gnu: cl-trivial-clipboard: Update to 0.0.0-6.6ddf8d5....* gnu/packages/lisp-xyz.scm (sbcl-trivial-clipboard): Update to 0.0.0-6.6ddf8d5. [inputs]: Add wl-clipboard. [arguments]: Update 'fix-paths' phase. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-08-18gnu: Add cl-gtk4....* gnu/packages/lisp-xyz.scm (sbcl-cl-gtk4, cl-gtk4, ecl-cl-gtk4): New variables. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> ykonai 2023-08-18gnu: Add cl-glib....* gnu/packages/lisp-xyz.scm (sbcl-cl-glib, cl-glib, ecl-cl-glib): New variables. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> ykonai 2023-08-18gnu: Add cl-gobject-introspection-wrapper....* gnu/packages/lisp-xyz.scm (sbcl-cl-gobject-introspection-wrapper, cl-gobject-introspection-wrapper, ecl-cl-gobject-introspection-wrapper): New variables. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> ykonai 2023-08-18gnu: cl-gobject-introspection: Update to 0.3-2.c4fef07....* gnu/packages/lisp-xyz.scm (sbcl-cl-gobject-introspection): Update to 0.3-2.c4fef07. [inputs]: Remove labels. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> ykonai 2023-08-18gnu: cl-nasdf: Update to 0.1.7....* gnu/packages/lisp-xyz.scm (sbcl-nasdf): Update to 0.1.7. [arguments]: Remove trailing boolean. Co-authored-by: Artyom Bologov <mail@aartaka.me> Guillaume Le Vaillant 2023-08-10gnu: cl-mime: Fix home page URL....* gnu/packages/lisp-xyz.scm (sbcl-cl-mime)[home-page]: Use the correct URL. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Konrad Hinsen 2023-08-08gnu: cl-nodgui: Remove input labels....* gnu/packages/lisp-xyz.scm (sbcl-nodgui)[inputs]: Remove labels. [arguments]: Use gexp. Guillaume Le Vaillant 2023-08-08gnu: cl-nodgui: Update to 0.4.8.5-2.4a9c2e7....* gnu/packages/lisp-xyz.scm (sbcl-nodgui): Update to 0.4.8.5-2.4a9c2e7. [source, home-page]: Switch from Notabug to Codeberg. [inputs]: Remove sbcl-cl-lex and sbcl-cl-yacc. Add sbcl-esrap and tklib. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> cage 2023-08-08gnu: cl-colors2: Update to 0.5.4-4.7a14107....* gnu/packages/lisp-xyz.scm (sbcl-cl-colors2): Update to 0.5.4-4.7a14107. [source, home-page]: Switch from Notabug to Codeberg. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> cage 2023-08-08gnu: cl-i18n: Update to 0.5.5-3.acb162a....* gnu/packages/lisp-xyz.scm (sbcl-cl-i18n): Update to 0.5.5-3.acb162a. [source, home-page]: Switch from Notabug to Codeberg. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> cage 2023-08-08gnu: cl-tooter: Update to 1.0.0-4.2e1b22f05....* gnu/packages/lisp-xyz.scm (sbcl-tooter): Update to 1.0.0-4.2e1b22f05. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> cage 2023-08-02gnu: Add cl-transmission....* gnu/packages/lisp-xyz.scm (cl-transmission, ecl-transmission, sbcl-transmission): New variables. Pierre Neidhardt 2023-07-25gnu: cl-nasdf: Update to 0.1.6....* gnu/packages/lisp-xyz.scm (sbcl-nasdf): Update to 0.1.6. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-07-24gnu: cl-ironclad: Update to 0.59....* gnu/packages/lisp-xyz.scm (sbcl-ironclad): Update to 0.59. Guillaume Le Vaillant 2023-07-19gnu: cl-usocket: Update to 0.8.6....* gnu/packages/lisp-xyz.scm (sbcl-usocket): Update to 0.8.6. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-07-19gnu: cl-ndebug: Update to 0.2.0....* gnu/packages/lisp-xyz.scm (sbcl-ndebug): Update to 0.2.0. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-07-19gnu: cl-array-utils: Update to 1.2.0-0.29da8fc....* gnu/packages/lisp-xyz.scm (sbcl-array-utils): Update to 1.2.0-0.29da8fc. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Andre A. Gomes 2023-07-15gnu: cl-nhooks: Update to 1.2.1....* gnu/packages/lisp-xyz.scm (sbcl-nhooks): Update to 1.2.1. [native-inputs]: Remove sbcl-fiveam, add sbcl-lisp-unit2. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Artyom Bologov 2023-07-10gnu: sbcl-ospm: Update to 0.0.2....* gnu/packages/lisp-xyz.scm (sbcl-ospm): Update to 0.0.2. Pierre Neidhardt 2023-07-10gnu: cl-spinneret: Update to 3.0-6.d4398b5....* gnu/packages/lisp-xyz.scm (sbcl-spinneret): Update to 3.0-6.d4398b5. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Artyom Bologov 2023-07-04gnu: Add cl-postgres+local-time....The local-time extension for cl-postgres has to be put in a separate package to solve a dependency cycle between local-time and postmodern. * gnu/packages/lisp-xyz.scm (sbcl-local-time)[arguments]: Add 'delete-local-time' phase. (sbcl-cl-postgres+local-time): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Roman Scherer 2023-06-17gnu: cl-colors2: Update to 0.5.4-3.cc03bad....* gnu/packages/lisp-xyz.scm (sbcl-cl-colors2): Update to 0.5.4-3.cc03bad. [description]: Update with the latest changes. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Artyom Bologov 2023-06-17gnu: cl-nclasses: Update to 0.6.0....* gnu/packages/lisp-xyz.scm (sbcl-nclasses): Update to 0.6.0. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Artyom Bologov