mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
installer: Offer NM, Connman, and DHCP to non-desktop installs.
* gnu/installer/services.scm (%system-services): Add NetworkManager, Connman, and the DHCP client. * gnu/installer/newt/services.scm (run-networking-cbt-page): Add 'network-management?' parameter and honor it. (run-services-page): Adjust call accordingly.
This commit is contained in:
parent
ecfbc51faa
commit
2e55f37c0c
2 changed files with 31 additions and 7 deletions
|
@ -45,13 +45,20 @@ (define (run-desktop-environments-cbt-page)
|
||||||
(condition
|
(condition
|
||||||
(&installer-step-abort))))))
|
(&installer-step-abort))))))
|
||||||
|
|
||||||
(define (run-networking-cbt-page)
|
(define (run-networking-cbt-page network-management?)
|
||||||
"Run a page allowing the user to select networking services."
|
"Run a page allowing the user to select networking services. When
|
||||||
|
NETWORK-MANAGEMENT? is true, include network management services like
|
||||||
|
NetworkManager."
|
||||||
(run-checkbox-tree-page
|
(run-checkbox-tree-page
|
||||||
#:info-text (G_ "You can now select networking services to run on your
|
#:info-text (G_ "You can now select networking services to run on your \
|
||||||
system.")
|
system.")
|
||||||
#:title (G_ "Network service")
|
#:title (G_ "Network service")
|
||||||
#:items (filter networking-system-service? %system-services)
|
#:items (filter (let ((types (if network-management?
|
||||||
|
'(network-management networking)
|
||||||
|
'(networking))))
|
||||||
|
(lambda (service)
|
||||||
|
(memq (system-service-type service) types)))
|
||||||
|
%system-services)
|
||||||
#:item->text system-service-name
|
#:item->text system-service-name
|
||||||
#:checkbox-tree-height 5
|
#:checkbox-tree-height 5
|
||||||
#:exit-button-callback-procedure
|
#:exit-button-callback-procedure
|
||||||
|
@ -61,5 +68,8 @@ (define (run-networking-cbt-page)
|
||||||
(&installer-step-abort))))))
|
(&installer-step-abort))))))
|
||||||
|
|
||||||
(define (run-services-page)
|
(define (run-services-page)
|
||||||
(append (run-desktop-environments-cbt-page)
|
(let ((desktop (run-desktop-environments-cbt-page)))
|
||||||
(run-networking-cbt-page)))
|
;; When the user did not select any desktop services, and thus didn't get
|
||||||
|
;; '%desktop-services', offer network management services.
|
||||||
|
(append desktop
|
||||||
|
(run-networking-cbt-page (null? desktop)))))
|
||||||
|
|
|
@ -69,7 +69,21 @@ (define %system-services
|
||||||
(system-service
|
(system-service
|
||||||
(name "Tor anonymous network router")
|
(name "Tor anonymous network router")
|
||||||
(type 'networking)
|
(type 'networking)
|
||||||
(snippet '(service tor-service-type))))))
|
(snippet '(service tor-service-type)))
|
||||||
|
|
||||||
|
;; Network connectivity management.
|
||||||
|
(system-service
|
||||||
|
(name "NetworkManager network connection manager")
|
||||||
|
(type 'network-management)
|
||||||
|
(snippet '(service network-manager-service-type)))
|
||||||
|
(system-service
|
||||||
|
(name "Connman network connection manager")
|
||||||
|
(type 'network-management)
|
||||||
|
(snippet '(service connman-service-type)))
|
||||||
|
(system-service
|
||||||
|
(name "DHCP client")
|
||||||
|
(type 'network-management)
|
||||||
|
(snippet '(service dhcp-client-service))))))
|
||||||
|
|
||||||
(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."
|
||||||
|
|
Loading…
Reference in a new issue