aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-01-20 22:12:10 +0100
committerLudovic Courtès <ludo@gnu.org>2019-01-20 22:12:10 +0100
commit3e2d4e69c340c3520f546f8c7e21e52383058d1c (patch)
tree0bc92edb753cfdf9a9e7ef763ebc19f0cd2d528c /gnu/services
parentad79ae7e2d7505292b11e87302b08f4db0f934e9 (diff)
parente5ad2cdf172eecc7edef37a500593b1941af013c (diff)
downloadguix-3e2d4e69c340c3520f546f8c7e21e52383058d1c.tar
guix-3e2d4e69c340c3520f546f8c7e21e52383058d1c.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/avahi.scm52
-rw-r--r--gnu/services/base.scm52
-rw-r--r--gnu/services/desktop.scm6
-rw-r--r--gnu/services/herd.scm7
-rw-r--r--gnu/services/ssh.scm10
5 files changed, 82 insertions, 45 deletions
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 5de30ffb97..547d826551 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,9 +24,22 @@
#:use-module (gnu system shadow)
#:use-module (gnu packages avahi)
#:use-module (gnu packages admin)
+ #:use-module (guix deprecation)
#:use-module (guix records)
#:use-module (guix gexp)
#:export (avahi-configuration
+ avahi-configuration?
+
+ avahi-configuration-avahi
+ avahi-configuration-debug?
+ avahi-configuration-host-name
+ avahi-configuration-publish?
+ avahi-configuration-publish-workstation?
+ avahi-configuration-ipv4?
+ avahi-configuration-ipv6?
+ avahi-configuration-wide-area?
+ avahi-configuration-domains-to-browse
+
avahi-service
avahi-service-type))
@@ -37,7 +50,6 @@
;;;
;;; Code:
- ;; TODO: Export.
(define-record-type* <avahi-configuration>
avahi-configuration make-avahi-configuration
avahi-configuration?
@@ -45,18 +57,24 @@
(default avahi))
(debug? avahi-configuration-debug? ;Boolean
(default #f))
- (host-name avahi-configuration-host-name) ;string
- (publish? avahi-configuration-publish?) ;Boolean
+ (host-name avahi-configuration-host-name ;string | #f
+ (default #f))
+ (publish? avahi-configuration-publish? ;boolean
+ (default #t))
;; The default for this was #t in Avahi 0.6.31 and became #f in 0.7. For
;; now we stick to the old default.
(publish-workstation? avahi-configuration-publish-workstation? ;Boolean
(default #t))
- (ipv4? avahi-configuration-ipv4?) ;Boolean
- (ipv6? avahi-configuration-ipv6?) ;Boolean
- (wide-area? avahi-configuration-wide-area?) ;Boolean
- (domains-to-browse avahi-configuration-domains-to-browse)) ;list of strings
+ (ipv4? avahi-configuration-ipv4? ;Boolean
+ (default #t))
+ (ipv6? avahi-configuration-ipv6? ;Boolean
+ (default #t))
+ (wide-area? avahi-configuration-wide-area? ;Boolean
+ (default #f))
+ (domains-to-browse avahi-configuration-domains-to-browse ;list of strings
+ (default '())))
(define* (configuration-file config)
"Return an avahi-daemon configuration file based on CONFIG, an
@@ -145,14 +163,16 @@ service switch (NSS) with support for @code{.local} host name resolution.")
;; Provide 'avahi-browse', 'avahi-resolve', etc. in
;; the system profile.
(service-extension profile-service-type
- avahi-package))))))
-
-(define* (avahi-service #:key (avahi avahi) debug?
- host-name
- (publish? #t)
- (ipv4? #t) (ipv6? #t)
- wide-area?
- (domains-to-browse '()))
+ avahi-package)))
+ (default-value (avahi-configuration)))))
+
+(define-deprecated (avahi-service #:key (avahi avahi) debug?
+ host-name
+ (publish? #t)
+ (ipv4? #t) (ipv6? #t)
+ wide-area?
+ (domains-to-browse '()))
+ avahi-service-type
"Return a service that runs @command{avahi-daemon}, a system-wide
mDNS/DNS-SD responder that allows for service discovery and
\"zero-configuration\" host name lookups (see @uref{http://avahi.org/}), and
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 8395a856fc..d2baea0dd0 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -818,6 +819,7 @@ Return a service that sets up Unicode support in @var{tty} and loads
(service-type (name 'login)
(extensions (list (service-extension pam-root-service-type
login-pam-service)))
+ (default-value (login-configuration))
(description
"Provide a console log-in service as specified by its
configuration value, a @code{login-configuration} object.")))
@@ -1358,6 +1360,7 @@ the tty to run, among other things."
(name-services (append
(nscd-configuration-name-services config)
name-services)))))
+ (default-value %nscd-default-configuration)
(description
"Runs libc's @dfn{name service cache daemon} (nscd) with the
given configuration---an @code{<nscd-configuration>} object. @xref{Name
@@ -1813,7 +1816,7 @@ archive}). If that is not the case, the service will fail to start."
udev-configuration make-udev-configuration
udev-configuration?
(udev udev-configuration-udev ;<package>
- (default udev))
+ (default eudev))
(rules udev-configuration-rules ;list of <package>
(default '())))
@@ -1996,6 +1999,7 @@ the udev rules in use.")
(udev-configuration
(udev udev)
(rules (append initial-rules rules)))))))
+ (default-value (udev-configuration))
(description
"Run @command{udev}, which populates the @file{/dev}
directory dynamically. Get extra rules from the packages listed in the
@@ -2138,7 +2142,7 @@ This service is not part of @var{%base-services}."
(shepherd-service
(documentation "kmscon virtual terminal")
- (requirement '(user-processes udev dbus-system virtual-terminal))
+ (requirement '(user-processes udev dbus-system))
(provision (list (symbol-append 'term- (string->symbol virtual-terminal))))
(start #~(make-forkexec-constructor #$kmscon-command))
(stop #~(make-kill-destructor)))))))
@@ -2293,7 +2297,7 @@ to handle."
(define %base-services
;; Convenience variable holding the basic services.
- (list (login-service)
+ (list (service login-service-type)
(service virtual-terminal-service-type)
(service console-font-service-type
@@ -2301,23 +2305,23 @@ to handle."
(cons tty %default-console-font))
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
- (agetty-service (agetty-configuration
- (extra-options '("-L")) ; no carrier detect
- (term "vt100")
- (tty #f))) ; automatic
-
- (mingetty-service (mingetty-configuration
- (tty "tty1")))
- (mingetty-service (mingetty-configuration
- (tty "tty2")))
- (mingetty-service (mingetty-configuration
- (tty "tty3")))
- (mingetty-service (mingetty-configuration
- (tty "tty4")))
- (mingetty-service (mingetty-configuration
- (tty "tty5")))
- (mingetty-service (mingetty-configuration
- (tty "tty6")))
+ (service agetty-service-type (agetty-configuration
+ (extra-options '("-L")) ; no carrier detect
+ (term "vt100")
+ (tty #f))) ; automatic
+
+ (service mingetty-service-type (mingetty-configuration
+ (tty "tty1")))
+ (service mingetty-service-type (mingetty-configuration
+ (tty "tty2")))
+ (service mingetty-service-type (mingetty-configuration
+ (tty "tty3")))
+ (service mingetty-service-type (mingetty-configuration
+ (tty "tty4")))
+ (service mingetty-service-type (mingetty-configuration
+ (tty "tty5")))
+ (service mingetty-service-type (mingetty-configuration
+ (tty "tty6")))
(service static-networking-service-type
(list (static-networking (interface "lo")
@@ -2326,13 +2330,15 @@ to handle."
(provision '(loopback)))))
(syslog-service)
(service urandom-seed-service-type)
- (guix-service)
- (nscd-service)
+ (service guix-service-type)
+ (service nscd-service-type)
;; The LVM2 rules are needed as soon as LVM2 or the device-mapper is
;; used, so enable them by default. The FUSE and ALSA rules are
;; less critical, but handy.
- (udev-service #:rules (list lvm2 fuse alsa-utils crda))
+ (service udev-service-type
+ (udev-configuration
+ (rules (list lvm2 fuse alsa-utils crda))))
(service special-files-service-type
`(("/bin/sh" ,(file-append (canonical-package bash)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 47d1096c6d..fbeabf1162 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
@@ -986,13 +986,13 @@ as expected.")))
;; The D-Bus clique.
(service network-manager-service-type)
(service wpa-supplicant-service-type) ;needed by NetworkManager
- (avahi-service)
+ (service avahi-service-type)
(udisks-service)
(upower-service)
(accountsservice-service)
(colord-service)
(geoclue-service)
- (polkit-service)
+ (service polkit-service-type)
(elogind-service)
(dbus-service)
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 8ff817759d..9fe757fb73 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -252,9 +252,10 @@ when passed a service with an already-registered name."
services
(remove registered? services))))))
-(define (start-service name)
- (with-shepherd-action name ('start) result
- result))
+(define* (start-service name #:optional (arguments '()))
+ (invoke-action name 'start arguments
+ (lambda (result)
+ result)))
(define (stop-service name)
(with-shepherd-action name ('stop) result
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index bb94c5f41a..97b7f3c07b 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -323,6 +324,12 @@ The other options should be self-descriptive."
(log-level openssh-configuration-log-level
(default 'info))
+ ;; String
+ ;; This is an "escape hatch" to provide configuration that isn't yet
+ ;; supported by this configuration record.
+ (extra-content openssh-configuration-extra-content
+ (default ""))
+
;; list of user-name/file-like tuples
(authorized-keys openssh-authorized-keys
(default '()))
@@ -471,6 +478,9 @@ of user-name/file-like tuples."
(match-lambda
((name command) (format port "Subsystem\t~a\t~a\n" name command)))
'#$(openssh-configuration-subsystems config))
+
+ (format port "~a\n"
+ #$(openssh-configuration-extra-content config))
#t)))))
(define (openssh-shepherd-service config)