unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: New VM image
Date: Thu, 25 Apr 2019 18:44:07 +0200	[thread overview]
Message-ID: <87zhoekpbc.fsf_-_@gnu.org> (raw)
In-Reply-To: <87d0ll43pl.fsf@gmail.com> (Chris Marusich's message of "Tue, 16 Apr 2019 22:10:14 -0700")

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

Hello Guix!

The attached config file can be used to produce a 2.9G QCOW image
(uncompressed) that internally appears to have a 20G file system:

  guix system vm-image --image-size=20G vm-live.tmpl

The image logs into Xfce and from there people can spawn a terminal, run
‘guix package -i icecat’, etc.

I think it would fill the need of those who want to see what Guix is
like, and also the need of developers who want to test their software on
Guix without installing it (I’d argue that installing Guix on top of
their distro is simpler, but some people will use the VM image for that
purpose anyway.)

What do people think?

If that’s fine with you I can commit it and update the doc & makefiles.

Thanks,
Ludo’.


[-- Attachment #2: the config --]
[-- Type: text/plain, Size: 2896 bytes --]

;; 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) (srfi srfi-1))
(use-service-modules xorg desktop)
(use-package-modules bootloaders nvi 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

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

(define this-file
  (local-file "./vm-live.tmpl" "config.scm"))


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

  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (target "/dev/sda")
               (terminal-outputs '(console))))
  (file-systems (cons (file-system
                        (mount-point "/")
                        (device "/dev/vda")
                        (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))

  (packages (cons* nvi wget %base-packages))

  (services (cons* (service xfce-desktop-service-type)

                   ;; Copy this file to /etc/config.scm in the OS.
                   (simple-service 'config-file etc-service-type
                                   `(("config.scm" ,this-file)))

                   ;; 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)))))

                   (remove (lambda (service)
                             (eq? gdm-service-type (service-kind service)))
                           (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))

  reply	other threads:[~2019-04-25 16:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 14:56 VM image: can we simplify its use? Ludovic Courtès
2019-04-06 20:12 ` Gábor Boskovits
2019-04-09 20:48 ` Leo Famulari
2019-04-10 18:38   ` Daniel Jiang
2019-04-10 20:54     ` Ludovic Courtès
2019-04-10 20:52   ` Ludovic Courtès
2019-04-17  5:10   ` Chris Marusich
2019-04-25 16:44     ` Ludovic Courtès [this message]
2019-04-25 17:19       ` New VM image Leo Famulari
2019-04-26  8:03       ` Chris Marusich
2019-04-26 13:29         ` Ludovic Courtès
2019-04-26 14:28           ` Danny Milosavljevic
2019-04-27 13:15           ` Ludovic Courtès
2019-04-30  3:09             ` Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhoekpbc.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).