all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 050c0bb971027911b4370834e80367edba7ab506 5149 bytes (raw)
name: gnu/system/examples/vm-image.tmpl 	 # note: path name is non-authoritative(*)

  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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
 
;; -*- mode: scheme; -*-
;; 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 mcron networking spice ssh xorg sddm)
(use-package-modules bootloaders fonts
                     package-management xdisorg 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 "
                        (or (getenv "GUIX_DISPLAYED_VERSION")
                            (package-version guix))))

  (firmware '())

  ;; Images automatically get the 'root, 'esp, and 'disk targets configured as
  ;; needed.
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (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
                 ;; Auto-started script providing SPICE dynamic resizing for
                 ;; Xfce (see:
                 ;; https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/142).
                 x-resize)
           %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
                             ;; The QXL virtual GPU driver is added to provide
                             ;; a better SPICE experience.
                             (modules (cons xf86-video-qxl
                                            %default-xorg-modules))
                             (keyboard-layout keyboard-layout)))))

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

                 ;; Add support for the SPICE protocol, which enables dynamic
                 ;; resizing of the guest screen resolution, clipboard
                 ;; integration with the host, etc.
                 (service spice-vdagent-service-type)

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

           ;; Remove some services that don't make sense in a VM.
           (remove (lambda (service)
                     (let ((type (service-kind service)))
                       (or (memq type
                                 (list gdm-service-type
                                       sddm-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)))

                     ;; Install and run the current Guix rather than an older
                     ;; snapshot.
                     (guix-service-type config =>
                                        (guix-configuration
                                         (inherit config)
                                         (guix (current-guix))))))))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

debug log:

solving 050c0bb971 ...
found 050c0bb971 in https://yhetil.org/guix/a3ca6f369ad71d685916362c92be4469a7fb055b.1722741997.git.lilah@lunabee.space/ ||
	https://yhetil.org/guix/3ba36c6fa8e419e45e92e1a80fd9ff056cddba37.1722989488.git.lilah@lunabee.space/ ||
	https://yhetil.org/guix/362227a8be0534e3fcb6f6e0822105e40668dac7.1722803521.git.lilah@lunabee.space/ ||
	https://yhetil.org/guix/df4d441610f9f6b871d019b61ef4b7dc99312212.1722912293.git.lilah@lunabee.space/ ||
	https://yhetil.org/guix/04ccc75cd1a5ad6d9e7b3c69bbf37049bdc20e7b.1722794774.git.lilah@lunabee.space/ ||
	https://yhetil.org/guix/d460edb8b562a01251eb4ad911bd7c8d908d1445.1727201267.git.herman@rimm.ee/
found 589de493b1 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 589de493b1367053ca88eabd6ee59d472ac01cc3	gnu/system/examples/vm-image.tmpl

applying [1/1] https://yhetil.org/guix/a3ca6f369ad71d685916362c92be4469a7fb055b.1722741997.git.lilah@lunabee.space/
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl
index 589de493b1..050c0bb971 100644

Checking patch gnu/system/examples/vm-image.tmpl...
Applied patch gnu/system/examples/vm-image.tmpl cleanly.

skipping https://yhetil.org/guix/3ba36c6fa8e419e45e92e1a80fd9ff056cddba37.1722989488.git.lilah@lunabee.space/ for 050c0bb971
skipping https://yhetil.org/guix/362227a8be0534e3fcb6f6e0822105e40668dac7.1722803521.git.lilah@lunabee.space/ for 050c0bb971
skipping https://yhetil.org/guix/df4d441610f9f6b871d019b61ef4b7dc99312212.1722912293.git.lilah@lunabee.space/ for 050c0bb971
skipping https://yhetil.org/guix/04ccc75cd1a5ad6d9e7b3c69bbf37049bdc20e7b.1722794774.git.lilah@lunabee.space/ for 050c0bb971
skipping https://yhetil.org/guix/d460edb8b562a01251eb4ad911bd7c8d908d1445.1727201267.git.herman@rimm.ee/ for 050c0bb971
index at:
100644 050c0bb971027911b4370834e80367edba7ab506	gnu/system/examples/vm-image.tmpl

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.