From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: New VM image Date: Thu, 25 Apr 2019 18:44:07 +0200 Message-ID: <87zhoekpbc.fsf_-_@gnu.org> References: <87d0m1stsc.fsf@inria.fr> <20190409204810.GA26383@jasmine.lan> <87d0ll43pl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:55452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJhTo-0001GH-Hx for guix-devel@gnu.org; Thu, 25 Apr 2019 12:44:13 -0400 In-Reply-To: <87d0ll43pl.fsf@gmail.com> (Chris Marusich's message of "Tue, 16 Apr 2019 22:10:14 -0700") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Chris Marusich Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=3D20G vm-live.tmpl The image logs into Xfce and from there people can spawn a terminal, run =E2=80=98guix package -i icecat=E2=80=99, 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=E2=80=99d 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=E2=80=99s fine with you I can commit it and update the doc & makefi= les. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=vm-live.tmpl Content-Description: the config ;; 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)) --=-=-=--