summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am3
-rw-r--r--doc.am3
-rw-r--r--doc/guix.texi12
-rw-r--r--gnu/system/examples/desktop.tmpl20
-rw-r--r--gnu/system/examples/lightweight-desktop.tmpl45
-rw-r--r--gnu/system/install.scm6
7 files changed, 75 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index b5bbbaabdbf..003412eeab3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -123,3 +123,4 @@ Makefile.in
123config.cache 123config.cache
124stamp-h[0-9] 124stamp-h[0-9]
125tmp 125tmp
126/doc/os-config-lightweight-desktop.texi
diff --git a/Makefile.am b/Makefile.am
index a9c281d4d19..06700def934 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -183,7 +183,8 @@ KCONFIGS = \
183# Templates, examples. 183# Templates, examples.
184EXAMPLES = \ 184EXAMPLES = \
185 gnu/system/examples/bare-bones.tmpl \ 185 gnu/system/examples/bare-bones.tmpl \
186 gnu/system/examples/desktop.tmpl 186 gnu/system/examples/desktop.tmpl \
187 gnu/system/examples/lightweight-desktop.tmpl
187 188
188GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go 189GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
189 190
diff --git a/doc.am b/doc.am
index 8356ffa2dd6..b9f07c3590a 100644
--- a/doc.am
+++ b/doc.am
@@ -47,7 +47,8 @@ EXTRA_DIST += \
47 47
48OS_CONFIG_EXAMPLES_TEXI = \ 48OS_CONFIG_EXAMPLES_TEXI = \
49 doc/os-config-bare-bones.texi \ 49 doc/os-config-bare-bones.texi \
50 doc/os-config-desktop.texi 50 doc/os-config-desktop.texi \
51 doc/os-config-lightweight-desktop.texi
51 52
52# Bundle this file so that makeinfo finds it in out-of-source-tree builds. 53# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
53BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) 54BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
diff --git a/doc/guix.texi b/doc/guix.texi
index 913545f1a71..186b8502e2f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6218,13 +6218,21 @@ to create a new configuration which has the same values as the old
6218configuration, but with a few modifications. 6218configuration, but with a few modifications.
6219 6219
6220The configuration for a typical ``desktop'' usage, with the X11 display 6220The configuration for a typical ``desktop'' usage, with the X11 display
6221server, a desktop environment, network management, power management, and 6221server, GNOME and Xfce (users can choose which of these desktop
6222more, would look like this: 6222environments to use at the log-in screen by pressing @kbd{F1}), network
6223management, power management, and more, would look like this:
6223 6224
6224@lisp 6225@lisp
6225@include os-config-desktop.texi 6226@include os-config-desktop.texi
6226@end lisp 6227@end lisp
6227 6228
6229A graphical environment with a choice of lightweight window managers
6230instead of full-blown desktop environments would look like this:
6231
6232@lisp
6233@include os-config-lightweight-desktop.texi
6234@end lisp
6235
6228@xref{Desktop Services}, for the exact list of services provided by 6236@xref{Desktop Services}, for the exact list of services provided by
6229@var{%desktop-services}. @xref{X.509 Certificates}, for background 6237@var{%desktop-services}. @xref{X.509 Certificates}, for background
6230information about the @code{nss-certs} package that is used here. 6238information about the @code{nss-certs} package that is used here.
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index 07183a533ba..2fcf90f8b16 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -1,9 +1,9 @@
1;; This is an operating system configuration template 1;; This is an operating system configuration template
2;; for a "desktop" setup with X11. 2;; for a "desktop" setup with GNOME and Xfce.
3 3
4(use-modules (gnu) (gnu system nss)) 4(use-modules (gnu) (gnu system nss))
5(use-service-modules desktop) 5(use-service-modules desktop)
6(use-package-modules xfce ratpoison certs) 6(use-package-modules certs)
7 7
8(operating-system 8(operating-system
9 (host-name "antelope") 9 (host-name "antelope")
@@ -29,15 +29,17 @@
29 (home-directory "/home/bob")) 29 (home-directory "/home/bob"))
30 %base-user-accounts)) 30 %base-user-accounts))
31 31
32 ;; Add Xfce and Ratpoison; that allows us to choose 32 ;; This is where we specify system-wide packages.
33 ;; sessions using either of these at the log-in screen. 33 (packages (cons* nss-certs ;for HTTPS access
34 (packages (cons* xfce ratpoison ;desktop environments
35 nss-certs ;for HTTPS access
36 %base-packages)) 34 %base-packages))
37 35
38 ;; Use the "desktop" services, which include the X11 36 ;; Add GNOME and/or Xfce---we can choose at the log-in
39 ;; log-in service, networking with Wicd, and more. 37 ;; screen with F1. Use the "desktop" services, which
40 (services %desktop-services) 38 ;; include the X11 log-in service, networking with Wicd,
39 ;; and more.
40 (services (cons* (gnome-desktop-service)
41 (xfce-desktop-service)
42 %desktop-services))
41 43
42 ;; Allow resolution of '.local' host names with mDNS. 44 ;; Allow resolution of '.local' host names with mDNS.
43 (name-service-switch %mdns-host-lookup-nss)) 45 (name-service-switch %mdns-host-lookup-nss))
diff --git a/gnu/system/examples/lightweight-desktop.tmpl b/gnu/system/examples/lightweight-desktop.tmpl
new file mode 100644
index 00000000000..7cb461f2b96
--- /dev/null
+++ b/gnu/system/examples/lightweight-desktop.tmpl
@@ -0,0 +1,45 @@
1;; This is an operating system configuration template
2;; for a "desktop" setup without full-blown desktop
3;; environments.
4
5(use-modules (gnu) (gnu system nss))
6(use-service-modules desktop)
7(use-package-modules wm ratpoison certs)
8
9(operating-system
10 (host-name "antelope")
11 (timezone "Europe/Paris")
12 (locale "en_US.UTF-8")
13
14 ;; Assuming /dev/sdX is the target hard disk, and "my-root"
15 ;; is the label of the target root file system.
16 (bootloader (grub-configuration (device "/dev/sdX")))
17
18 (file-systems (cons (file-system
19 (device "my-root")
20 (title 'label)
21 (mount-point "/")
22 (type "ext4"))
23 %base-file-systems))
24
25 (users (cons (user-account
26 (name "alice")
27 (comment "Bob's brother")
28 (group "users")
29 (supplementary-groups '("wheel" "netdev"
30 "audio" "video"))
31 (home-directory "/home/alice"))
32 %base-user-accounts))
33
34 ;; Add a bunch of window managers; we can choose one at
35 ;; the log-in screen with F1.
36 (packages (cons* ratpoison i3-wm xmonad ;window managers
37 nss-certs ;for HTTPS access
38 %base-packages))
39
40 ;; Use the "desktop" services, which include the X11
41 ;; log-in service, networking with Wicd, and more.
42 (services %desktop-services)
43
44 ;; Allow resolution of '.local' host names with mDNS.
45 (name-service-switch %mdns-host-lookup-nss))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index b380716b69e..d6434fd00d3 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -215,9 +215,11 @@ the user's target storage device rather than on the RAM disk."
215 (string-append #$output "/" 215 (string-append #$output "/"
216 target))) 216 target)))
217 '(#$(file "bare-bones.tmpl") 217 '(#$(file "bare-bones.tmpl")
218 #$(file "desktop.tmpl")) 218 #$(file "desktop.tmpl")
219 #$(file "lightweight-desktop.tmpl"))
219 '("bare-bones.scm" 220 '("bare-bones.scm"
220 "desktop.scm")) 221 "desktop.scm"
222 "lightweight-desktop.scm"))
221 #t) 223 #t)
222 #:modules '((guix build utils)))) 224 #:modules '((guix build utils))))
223 225