From d038b674cf3e44462814da70f68522d0e3aab018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 22 Mar 2016 23:48:21 +0100 Subject: doc: Add "lightweight desktop" OS config example. * gnu/system/examples/desktop.tmpl (packages): Remove XFCE and RATPOISON. (services): Add 'gnome-desktop-service' and 'xfce-desktop-service'. * gnu/system/examples/lightweight-desktop.tmpl: New file. * Makefile.am (EXAMPLES): Add it. * doc.am (OS_CONFIG_EXAMPLES_TEXI): Add doc/os-config-lightweight-desktop.texi. * gnu/system/install.scm (/etc/configuration-files)[directory]: Add lightweight-desktop.tmpl. --- gnu/system/examples/desktop.tmpl | 20 +++++++------ gnu/system/examples/lightweight-desktop.tmpl | 45 ++++++++++++++++++++++++++++ gnu/system/install.scm | 6 ++-- 3 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 gnu/system/examples/lightweight-desktop.tmpl (limited to 'gnu/system') diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl index 07183a533b..2fcf90f8b1 100644 --- a/gnu/system/examples/desktop.tmpl +++ b/gnu/system/examples/desktop.tmpl @@ -1,9 +1,9 @@ ;; This is an operating system configuration template -;; for a "desktop" setup with X11. +;; for a "desktop" setup with GNOME and Xfce. (use-modules (gnu) (gnu system nss)) (use-service-modules desktop) -(use-package-modules xfce ratpoison certs) +(use-package-modules certs) (operating-system (host-name "antelope") @@ -29,15 +29,17 @@ (home-directory "/home/bob")) %base-user-accounts)) - ;; Add Xfce and Ratpoison; that allows us to choose - ;; sessions using either of these at the log-in screen. - (packages (cons* xfce ratpoison ;desktop environments - nss-certs ;for HTTPS access + ;; This is where we specify system-wide packages. + (packages (cons* nss-certs ;for HTTPS access %base-packages)) - ;; Use the "desktop" services, which include the X11 - ;; log-in service, networking with Wicd, and more. - (services %desktop-services) + ;; Add GNOME and/or Xfce---we can choose at the log-in + ;; screen with F1. Use the "desktop" services, which + ;; include the X11 log-in service, networking with Wicd, + ;; and more. + (services (cons* (gnome-desktop-service) + (xfce-desktop-service) + %desktop-services)) ;; Allow resolution of '.local' host names with mDNS. (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 0000000000..7cb461f2b9 --- /dev/null +++ b/gnu/system/examples/lightweight-desktop.tmpl @@ -0,0 +1,45 @@ +;; This is an operating system configuration template +;; for a "desktop" setup without full-blown desktop +;; environments. + +(use-modules (gnu) (gnu system nss)) +(use-service-modules desktop) +(use-package-modules wm ratpoison certs) + +(operating-system + (host-name "antelope") + (timezone "Europe/Paris") + (locale "en_US.UTF-8") + + ;; Assuming /dev/sdX is the target hard disk, and "my-root" + ;; is the label of the target root file system. + (bootloader (grub-configuration (device "/dev/sdX"))) + + (file-systems (cons (file-system + (device "my-root") + (title 'label) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + + (users (cons (user-account + (name "alice") + (comment "Bob's brother") + (group "users") + (supplementary-groups '("wheel" "netdev" + "audio" "video")) + (home-directory "/home/alice")) + %base-user-accounts)) + + ;; Add a bunch of window managers; we can choose one at + ;; the log-in screen with F1. + (packages (cons* ratpoison i3-wm xmonad ;window managers + nss-certs ;for HTTPS access + %base-packages)) + + ;; Use the "desktop" services, which include the X11 + ;; log-in service, networking with Wicd, and more. + (services %desktop-services) + + ;; Allow resolution of '.local' host names with mDNS. + (name-service-switch %mdns-host-lookup-nss)) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index b380716b69..d6434fd00d 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." (string-append #$output "/" target))) '(#$(file "bare-bones.tmpl") - #$(file "desktop.tmpl")) + #$(file "desktop.tmpl") + #$(file "lightweight-desktop.tmpl")) '("bare-bones.scm" - "desktop.scm")) + "desktop.scm" + "lightweight-desktop.scm")) #t) #:modules '((guix build utils)))) -- cgit v1.2.3 From ee03b75dfb3399f41002c38ac512473ab94afa74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 24 Mar 2016 21:22:56 +0100 Subject: install: Add /tmp as a tmpfs. Fixes . Reported by Michael Downey and Kei . * gnu/system/install.scm (installation-os)[file-systems]: Add "/tmp". --- gnu/system/install.scm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index d6434fd00d..7a363cac8e 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -340,17 +340,29 @@ Use Alt-F2 for documentation. (file-systems ;; Note: the disk image build code overrides this root file system with ;; the appropriate one. - (cons (file-system - (mount-point "/") - (device "gnu-disk-image") - (title 'label) - (type "ext4")) - %base-file-systems)) + (cons* (file-system + (mount-point "/") + (device "gnu-disk-image") + (title 'label) + (type "ext4")) + + ;; Make /tmp a tmpfs instead of keeping the unionfs. This is + ;; because FUSE creates '.fuse_hiddenXYZ' files for each open file, + ;; and this confuses Guix's test suite, for instance. See + ;; . + (file-system + (mount-point "/tmp") + (device "none") + (title 'device) + (type "tmpfs") + (check? #f)) + + %base-file-systems)) (users (list (user-account (name "guest") (group "users") - (supplementary-groups '("wheel")) ; allow use of sudo + (supplementary-groups '("wheel")) ; allow use of sudo (password "") (comment "Guest of GNU") (home-directory "/home/guest")))) -- cgit v1.2.3 From 0feefb530fff23ae038cac8d2a719b59db10c400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 24 Mar 2016 21:48:21 +0100 Subject: install: Remove cgroup and elogind file systems. * gnu/system/install.scm (installation-os): Explicitly list three file systems instead of using %BASE-FILE-SYSTEMS. --- gnu/system/install.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 7a363cac8e..4a230c8728 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -357,7 +357,11 @@ Use Alt-F2 for documentation. (type "tmpfs") (check? #f)) - %base-file-systems)) + ;; XXX: This should be %BASE-FILE-SYSTEMS but we don't need + ;; elogind's cgroup file systems. + (list %pseudo-terminal-file-system + %shared-memory-file-system + %immutable-store))) (users (list (user-account (name "guest") -- cgit v1.2.3 From 68abb9b04c0b0a22ea28d7fd89f07ecd10d2aa69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 24 Mar 2016 22:35:34 +0100 Subject: install: Use 'info-reader' instead of Texinfo 4. * gnu/system/install.scm (installation-os)[packages]: Remove TEXINFO-4 since %BASE-PACKAGES already provides the Info reader. (log-to-info): Use INFO-READER instead of TEXINFO-4. --- gnu/system/install.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 4a230c8728..a94e3ab2d5 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -111,7 +111,7 @@ manual." ;; 'gunzip' is needed to decompress the doc. (setenv "PATH" (string-append #$gzip "/bin")) - (execl (string-append #$texinfo-4 "/bin/info") "info" + (execl (string-append #$info-reader "/bin/info") "info" "-d" "/run/current-system/profile/share/info" "-f" (string-append #$guix "/share/info/guix.info") "-n" "System Installation")))) @@ -384,7 +384,6 @@ Use Alt-F2 for documentation. (base-pam-services #:allow-empty-passwords? #t)) (packages (cons* (canonical-package glibc) ;for 'tzselect' & co. - texinfo-4 ;for the standalone Info reader parted ddrescue grub ;mostly so xrefs to its manual work cryptsetup -- cgit v1.2.3