guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New ‘guix system’ command


From: Ludovic Courtès
Subject: New ‘guix system’ command
Date: Wed, 19 Feb 2014 23:22:04 +0100
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Howdy!

Did you see there’s a new ‘guix system’ command?  It’s wonderful.  Drop
the following in a file, say ‘os-config.scm’:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu packages emacs)
             (gnu packages xorg)
             (gnu packages base)
             (gnu packages admin)
             (gnu packages guile)
             (gnu packages bash)
             (gnu packages linux)
             (gnu packages less)
             (gnu packages gdb)
             (gnu services base)
             (gnu services networking)
             (gnu services xorg))

(operating-system
 (host-name "guix-is-great")
 (timezone "Europe/Paris")
 (locale "en_US.UTF-8")
 (users (list (user-account
               (name "joe")
               (uid 1000) (gid 100)
               (comment "Joe")
               (home-directory "/home/joe"))))
 (services (cons* (slim-service)

                  ;; QEMU networking settings.
                  (static-networking-service "eth0" "10.0.2.10"
                                             #:name-servers '("10.0.2.3")
                                             #:gateway "10.0.2.2")

                  %base-services))
 (packages (list coreutils
                 bash xterm emacs
                 guile-2.0 dmd util-linux strace gdb
                 xlsclients net-tools
                 inetutils findutils grep sed
                 procps psmisc less)))
--8<---------------cut here---------------end--------------->8---

Then run:

  ./pre-inst-env guix system vm os-config.scm

and finally run the script it returns.

The thing boots to Xorg and SLiM.  From there you can log in as ‘root’
(there’s a bug preventing from logging in as ‘joe’, but that’ll be fixed
when I get unionfs in place), and get into Ratpoison (if you’re not
familiar with it, type ‘C-t ?’.)

xterm doesn’t work currently because of missing device files, but until
then, you can run Emacs (via ‘C-t !’), and M-x shell if you really want
a shell.

The VM shares its store with the host, so the VM image itself is small
and quickly built.  This means that it’s now quite easy to add new
service definitions (info "(guix) Defining Services") and test them.


Of course we can then add other ‘guix system’ actions, in particular
‘boot’ and ‘install’.  That is not too difficult per se, but it’ll make
more sense when we really have all the important system services in a
sufficiently polished state (running e2fsck, supporting encrypted
partitions, running udev, having Xorg run on real hardware, etc.)

Feedback welcome!

Ludo’.

PS: This is +/- what you could be seen on the FOSDEM video, but it’s
    even better to try it at home.  :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]