installer: Offer the CUPS printing service.
* gnu/installer/services.scm (%system-services): Add CUPS. * gnu/installer/newt/services.scm (run-other-services-cbt-page): New procedure. (run-services-page): Call it last.master
parent
14298cd301
commit
6f13881f1e
|
@ -68,6 +68,28 @@ system.")
|
||||||
(condition
|
(condition
|
||||||
(&installer-step-abort)))))))
|
(&installer-step-abort)))))))
|
||||||
|
|
||||||
|
(define (run-other-services-cbt-page)
|
||||||
|
"Run a page allowing the user to select other services."
|
||||||
|
(let ((items (filter (lambda (service)
|
||||||
|
(not (member (system-service-type service)
|
||||||
|
'(desktop
|
||||||
|
network-management
|
||||||
|
networking))))
|
||||||
|
%system-services)))
|
||||||
|
(run-checkbox-tree-page
|
||||||
|
#:info-text (G_ "You can now select other services to run on your \
|
||||||
|
system.")
|
||||||
|
#:title (G_ "Other services")
|
||||||
|
#:items items
|
||||||
|
#:selection (map system-service-recommended? items)
|
||||||
|
#:item->text (compose G_ system-service-name)
|
||||||
|
#:checkbox-tree-height 9
|
||||||
|
#:exit-button-callback-procedure
|
||||||
|
(lambda ()
|
||||||
|
(raise
|
||||||
|
(condition
|
||||||
|
(&installer-step-abort)))))))
|
||||||
|
|
||||||
(define (run-network-management-page)
|
(define (run-network-management-page)
|
||||||
"Run a page to select among several network management methods."
|
"Run a page to select among several network management methods."
|
||||||
(let ((title (G_ "Network management")))
|
(let ((title (G_ "Network management")))
|
||||||
|
@ -100,4 +122,5 @@ client may be enough for a server.")
|
||||||
(run-networking-cbt-page)
|
(run-networking-cbt-page)
|
||||||
(if (null? desktop)
|
(if (null? desktop)
|
||||||
(list (run-network-management-page))
|
(list (run-network-management-page))
|
||||||
'()))))
|
'())
|
||||||
|
(run-other-services-cbt-page))))
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
|
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -117,7 +118,13 @@
|
||||||
(system-service
|
(system-service
|
||||||
(name (G_ "DHCP client (dynamic IP address assignment)"))
|
(name (G_ "DHCP client (dynamic IP address assignment)"))
|
||||||
(type 'network-management)
|
(type 'network-management)
|
||||||
(snippet '((service dhcp-client-service-type)))))))
|
(snippet '((service dhcp-client-service-type))))
|
||||||
|
|
||||||
|
;; Dealing with documents.
|
||||||
|
(system-service
|
||||||
|
(name (G_ "CUPS printing system (no Web interface by default)"))
|
||||||
|
(type 'document)
|
||||||
|
(snippet '((service cups-service-type)))))))
|
||||||
|
|
||||||
(define (desktop-system-service? service)
|
(define (desktop-system-service? service)
|
||||||
"Return true if SERVICE is a desktop environment service."
|
"Return true if SERVICE is a desktop environment service."
|
||||||
|
|
Reference in New Issue