diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-04-17 00:27:04 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-17 11:53:53 +0200 |
commit | 3ad3c55842dd34adc4b1a1b65ba0abfbdf5b92ee (patch) | |
tree | 650c3f709a5b19aeb868ccc06b2d18169a36da98 | |
parent | a0e16bec376c1117ad03394164a5860c56c66973 (diff) | |
download | guix-3ad3c55842dd34adc4b1a1b65ba0abfbdf5b92ee.tar guix-3ad3c55842dd34adc4b1a1b65ba0abfbdf5b92ee.tar.gz |
installer: Desktop environment page now includes window managers.
* gnu/installer/services.scm (<system-service>)[snippet]: Change to be a
list of sexps and add default value.
[packages]: New field.
(%system-services): Adjust 'snippet' fields to be lists of sexps.
Add Openbox, awesome, i3, and ratpoison.
(system-services->configuration): Adjust 'snippet' handling. Honor
'packages' field.
-rw-r--r-- | gnu/installer/services.scm | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm index 4dbfe74bf9..6d9d65e8c5 100644 --- a/gnu/installer/services.scm +++ b/gnu/installer/services.scm @@ -20,7 +20,6 @@ (define-module (gnu installer services) #:use-module (guix records) #:use-module (srfi srfi-1) - #:use-module (ice-9 match) #:export (system-service? system-service-name system-service-type @@ -37,7 +36,10 @@ system-service? (name system-service-name) ;string (type system-service-type) ;'desktop | 'networking - (snippet system-service-snippet)) ;sexp + (snippet system-service-snippet ;list of sexps + (default '())) + (packages system-service-packages ;list of sexps + (default '()))) ;; This is the list of desktop environments supported as services. (define %system-services @@ -51,26 +53,38 @@ (list (desktop-environment (name "GNOME") - (snippet '(service gnome-desktop-service-type))) + (snippet '((service gnome-desktop-service-type)))) (desktop-environment (name "Xfce") - (snippet '(service xfce-desktop-service-type))) + (snippet '((service xfce-desktop-service-type)))) (desktop-environment (name "MATE") - (snippet '(service mate-desktop-service-type))) + (snippet '((service mate-desktop-service-type)))) (desktop-environment (name "Enlightenment") - (snippet '(service enlightenment-desktop-service-type))) + (snippet '((service enlightenment-desktop-service-type)))) + (desktop-environment + (name "Openbox") + (packages '((specification->package "openbox")))) + (desktop-environment + (name "awesome") + (packages '((specification->package "awesome")))) + (desktop-environment + (name "i3") + (packages '((specification->package "i3-wm")))) + (desktop-environment + (name "ratpoison") + (packages '((specification->package "ratpoison")))) ;; Networking. (system-service (name (G_ "OpenSSH secure shell daemon (sshd)")) (type 'networking) - (snippet '(service openssh-service-type))) + (snippet '((service openssh-service-type)))) (system-service (name (G_ "Tor anonymous network router")) (type 'networking) - (snippet '(service tor-service-type))) + (snippet '((service tor-service-type)))) ;; Network connectivity management. (system-service @@ -86,7 +100,7 @@ (system-service (name (G_ "DHCP client (dynamic IP address assignment)")) (type 'network-management) - (snippet '(service dhcp-client-service-type)))))) + (snippet '((service dhcp-client-service-type))))))) (define (desktop-system-service? service) "Return true if SERVICE is a desktop environment service." @@ -98,20 +112,21 @@ (define (system-services->configuration services) "Return the configuration field for SERVICES." - (let* ((snippets (append-map (lambda (service) - (match (system-service-snippet service) - ((and lst (('service _ ...) ...)) - lst) - (sexp - (list sexp)))) - services)) + (let* ((snippets (append-map system-service-snippet services)) + (packages (append-map system-service-packages services)) (desktop? (find desktop-system-service? services)) (base (if desktop? '%desktop-services '%base-services))) (if (null? snippets) - `((services ,base)) - `((services (append (list ,@snippets + `(,@(if (null? packages) + '() + `((packages (list ,@packages)))) + (services ,base)) + `(,@(if (null? packages) + '() + `((packages (list ,@packages)))) + (services (append (list ,@snippets ,@(if desktop? ;; XXX: Assume 'keyboard-layout' is in |