diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/admin.scm | 2 | ||||
-rw-r--r-- | gnu/services/avahi.scm | 52 | ||||
-rw-r--r-- | gnu/services/base.scm | 73 | ||||
-rw-r--r-- | gnu/services/desktop.scm | 6 | ||||
-rw-r--r-- | gnu/services/docker.scm | 102 | ||||
-rw-r--r-- | gnu/services/herd.scm | 7 | ||||
-rw-r--r-- | gnu/services/mcron.scm | 8 | ||||
-rw-r--r-- | gnu/services/messaging.scm | 100 | ||||
-rw-r--r-- | gnu/services/networking.scm | 20 | ||||
-rw-r--r-- | gnu/services/ssh.scm | 10 | ||||
-rw-r--r-- | gnu/services/xorg.scm | 54 |
11 files changed, 341 insertions, 93 deletions
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index d7bda61ed7..a3e43dd1c1 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -14,7 +14,7 @@ ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; -;;; You should have received a copy of thye GNU General Public License +;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu services admin) 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 67bdaef18c..d2baea0dd0 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> @@ -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. ;;; @@ -25,6 +26,7 @@ (define-module (gnu services base) #:use-module (guix store) + #:use-module (guix deprecation) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system pam) @@ -614,8 +616,9 @@ file systems, as well as corresponding @file{/etc/fstab} entries."))) generator (RNG) with the value recorded when the system was last shut down."))) -(define (urandom-seed-service) ;deprecated - (service urandom-seed-service-type #f)) +(define-deprecated (urandom-seed-service) + urandom-seed-service-type + (service urandom-seed-service-type)) ;;; @@ -816,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."))) @@ -1356,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 @@ -1686,7 +1691,9 @@ failed to register public key '~a': ~a~%" key status))))))) (description "Run the build daemon of GNU@tie{}Guix, aka. @command{guix-daemon}."))) -(define* (guix-service #:optional (config %default-guix-configuration)) +(define-deprecated (guix-service #:optional + (config %default-guix-configuration)) + guix-service-type "Return a service that runs the Guix build daemon according to @var{config}." (service guix-service-type config)) @@ -1787,7 +1794,9 @@ failed to register public key '~a': ~a~%" key status))))))) "Add a Shepherd service running @command{guix publish}, a command that allows you to share pre-built binaries with others over HTTP."))) -(define* (guix-publish-service #:key (guix guix) (port 80) (host "localhost")) +(define-deprecated (guix-publish-service #:key (guix guix) + (port 80) (host "localhost")) + guix-publish-service-type "Return a service that runs @command{guix publish} listening on @var{host} and @var{port} (@pxref{Invoking guix publish}). @@ -1807,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 '()))) @@ -1990,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 @@ -2078,8 +2088,9 @@ command-line options. GPM allows users to use the mouse in the console, notably to select, copy, and paste text. The default options use the @code{ps2} protocol, which works for both USB and PS/2 mice."))) -(define* (gpm-service #:key (gpm gpm) ;deprecated - (options %default-gpm-options)) +(define-deprecated (gpm-service #:key (gpm gpm) + (options %default-gpm-options)) + gpm-service-type "Run @var{gpm}, the general-purpose mouse daemon, with the given command-line @var{options}. GPM allows users to use the mouse in the console, notably to select, copy, and paste text. The default value of @var{options} @@ -2131,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))))))) @@ -2286,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 @@ -2294,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") @@ -2319,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/docker.scm b/gnu/services/docker.scm new file mode 100644 index 0000000000..09fe3cc1c3 --- /dev/null +++ b/gnu/services/docker.scm @@ -0,0 +1,102 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu services docker) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:use-module (gnu packages docker) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + + #:export (docker-configuration + docker-service-type)) + +(define-configuration docker-configuration + (docker + (package docker) + "Docker daemon package.") + (containerd + (package containerd) + "containerd package.")) + +(define %docker-accounts + (list (user-group (name "docker") (system? #t)))) + +(define (%containerd-activation config) + (let ((state-dir "/var/lib/containerd")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (%docker-activation config) + (%containerd-activation config) + (let ((state-dir "/var/lib/docker")) + #~(begin + (use-modules (guix build utils)) + (mkdir-p #$state-dir)))) + +(define (containerd-shepherd-service config) + (let* ((package (docker-configuration-containerd config))) + (shepherd-service + (documentation "containerd daemon.") + (provision '(containerd)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/containerd")) + #:log-file "/var/log/containerd.log")) + (stop #~(make-kill-destructor))))) + +(define (docker-shepherd-service config) + (let* ((docker (docker-configuration-docker config))) + (shepherd-service + (documentation "Docker daemon.") + (provision '(dockerd)) + (requirement '(containerd + file-system-/sys/fs/cgroup/blkio + file-system-/sys/fs/cgroup/cpu + file-system-/sys/fs/cgroup/cpuset + file-system-/sys/fs/cgroup/devices + file-system-/sys/fs/cgroup/memory + ; TODO: file-system-/sys/fs/cgroup/pids + )) + (start #~(make-forkexec-constructor + (list (string-append #$docker "/bin/dockerd") + "-p" "/var/run/docker.pid") + #:pid-file "/var/run/docker.pid" + #:log-file "/var/log/docker.log")) + (stop #~(make-kill-destructor))))) + +(define docker-service-type + (service-type (name 'docker) + (description "Provide capability to run Docker application +bundles in Docker containers.") + (extensions + (list + (service-extension activation-service-type + %docker-activation) + (service-extension shepherd-root-service-type + (lambda (config) + (list (containerd-shepherd-service config) + (docker-shepherd-service config)))) + (service-extension account-service-type + (const %docker-accounts)))) + (default-value (docker-configuration)))) 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/mcron.scm b/gnu/services/mcron.scm index 120b663e3e..1b232b6cba 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +20,8 @@ #:use-module (gnu services) #:use-module (gnu services base) #:use-module (gnu services shepherd) - #:autoload (gnu packages guile) (mcron) + #:autoload (gnu packages guile-xyz) (mcron) + #:use-module (guix deprecation) #:use-module (guix records) #:use-module (guix gexp) #:use-module (srfi srfi-1) @@ -142,7 +143,8 @@ files." jobs))))) (default-value (mcron-configuration)))) ;empty job list -(define* (mcron-service jobs #:optional (mcron mcron)) +(define-deprecated (mcron-service jobs #:optional (mcron mcron)) + mcron-service-type "Return an mcron service running @var{mcron} that schedules @var{jobs}, a list of gexps denoting mcron job specifications. diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 1108006411..e70f1b70ef 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr> ;;; ;;; This file is part of GNU Guix. @@ -22,6 +22,8 @@ (define-module (gnu services messaging) #:use-module (gnu packages messaging) #:use-module (gnu packages admin) + #:use-module (gnu packages irc) + #:use-module (gnu packages tls) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services configuration) @@ -30,6 +32,7 @@ #:use-module (guix modules) #:use-module (guix records) #:use-module (guix packages) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (srfi srfi-35) #:use-module (ice-9 match) @@ -50,7 +53,10 @@ bitlbee-configuration bitlbee-configuration? bitlbee-service - bitlbee-service-type)) + bitlbee-service-type + + quassel-configuration + quassel-service-type)) ;;; Commentary: ;;; @@ -877,9 +883,10 @@ string, you could instantiate a prosody service like this: "Run @url{http://bitlbee.org,BitlBee}, a daemon that acts as a gateway between IRC and chat networks."))) -(define* (bitlbee-service #:key (bitlbee bitlbee) ;deprecated - (interface "127.0.0.1") (port 6667) - (extra-settings "")) +(define-deprecated (bitlbee-service #:key (bitlbee bitlbee) + (interface "127.0.0.1") (port 6667) + (extra-settings "")) + bitlbee-service-type "Return a service that runs @url{http://bitlbee.org,BitlBee}, a daemon that acts as a gateway between IRC and chat networks. @@ -895,3 +902,86 @@ configuration file." (bitlbee bitlbee) (interface interface) (port port) (extra-settings extra-settings)))) + + +;;; +;;; Quassel. +;;; + +(define-record-type* <quassel-configuration> + quassel-configuration make-quassel-configuration + quassel-configuration? + (quassel quassel-configuration-quassel + (default quassel)) + (interface quassel-configuration-interface + (default "::,0.0.0.0")) + (port quassel-configuration-port + (default 4242)) + (loglevel quassel-configuration-loglevel + (default "Info"))) + +(define quassel-shepherd-service + (match-lambda + (($ <quassel-configuration> quassel interface port loglevel) + (with-imported-modules (source-module-closure + '((gnu build shepherd) + (gnu system file-systems))) + (list (shepherd-service + (provision '(quassel)) + (requirement '(user-processes networking)) + (modules '((gnu build shepherd) + (gnu system file-systems))) + (start #~(make-forkexec-constructor/container + (list #$(file-append quassel "/bin/quasselcore") + "--configdir=/var/lib/quassel" + "--logfile=/var/log/quassel/core.log" + (string-append "--loglevel=" #$loglevel) + (string-append "--port=" (number->string #$port)) + (string-append "--listen=" #$interface)) + #:mappings (list (file-system-mapping + (source "/var/lib/quassel") + (target source) + (writable? #t)) + (file-system-mapping + (source "/var/log/quassel") + (target source) + (writable? #t))))) + (stop #~(make-kill-destructor)))))))) + +(define %quassel-account + (list (user-group (name "quassel") (system? #t)) + (user-account + (name "quasselcore") + (group "quassel") + (system? #t) + (comment "Quassel daemon user") + (home-directory "/var/lib/quassel") + (shell (file-append shadow "/sbin/nologin"))))) + +(define %quassel-activation + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib/quassel") + (mkdir-p "/var/log/quassel") + (let ((cert "/var/lib/quassel/quasselCert.pem")) + (unless (file-exists? cert) + (invoke #$(file-append openssl "/bin/openssl") + "req" "-x509" "-nodes" "-batch" "-days" "680" "-newkey" + "rsa" "-keyout" cert "-out" cert))))) + +(define quassel-service-type + (service-type (name 'quassel) + (extensions + (list (service-extension shepherd-root-service-type + quassel-shepherd-service) + (service-extension profile-service-type + (compose list quassel-configuration-quassel)) + (service-extension account-service-type + (const %quassel-account)) + (service-extension activation-service-type + (const %quassel-activation)))) + (default-value (quassel-configuration)) + (description + "Run @url{https://quassel-irc.org/,quasselcore}, the backend +for the distributed IRC client quassel, which allows you to connect from +multiple machines simultaneously."))) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index bfa6e297e6..cab129e0c3 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 John Darrington <jmd@gnu.org> @@ -45,6 +45,7 @@ #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) @@ -206,7 +207,8 @@ fe80::1%lo0 apps.facebook.com\n") (stop #~(make-kill-destructor)))) isc-dhcp)) -(define* (dhcp-client-service #:key (dhcp isc-dhcp)) ;deprecated +(define-deprecated (dhcp-client-service #:key (dhcp isc-dhcp)) + dhcp-client-service-type "Return a service that runs @var{dhcp}, a Dynamic Host Configuration Protocol (DHCP) client, on all the non-loopback network interfaces." (service dhcp-client-service-type dhcp)) @@ -374,9 +376,10 @@ daemon of the @uref{http://www.ntp.org, Network Time Foundation}. The daemon will keep the system clock synchronized with that of the given servers.") (default-value (ntp-configuration)))) -(define* (ntp-service #:key (ntp ntp) ;deprecated - (servers %ntp-servers) - allow-large-adjustment?) +(define-deprecated (ntp-service #:key (ntp ntp) + (servers %ntp-servers) + allow-large-adjustment?) + ntp-service-type "Return a service that runs the daemon from @var{ntp}, the @uref{http://www.ntp.org, Network Time Protocol package}. The daemon will keep the system clock synchronized with that of @var{servers}. @@ -752,9 +755,10 @@ HiddenServicePort ~a ~a~%" "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define* (tor-service #:optional - (config-file (plain-file "empty" "")) - #:key (tor tor)) +(define-deprecated (tor-service #:optional + (config-file (plain-file "empty" "")) + #:key (tor tor)) + tor-service-type "Return a service to run the @uref{https://torproject.org, Tor} anonymous networking daemon. 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) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index ea8433af3a..d66254c03d 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -1,7 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com> -;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix records) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) @@ -85,11 +87,11 @@ ;;; Code: (define %default-xorg-modules - ;; Default list of modules loaded by the server. Note that the order - ;; matters since it determines which driver is going to be used when there's - ;; a choice. + ;; Default list of modules loaded by the server. When multiple drivers + ;; match, the first one in the list is loaded. (list xf86-video-vesa xf86-video-fbdev + xf86-video-amdgpu xf86-video-ati xf86-video-cirrus xf86-video-intel @@ -520,14 +522,15 @@ reboot_cmd " shepherd "/sbin/reboot\n" (const (list xterm))))) (default-value (slim-configuration)))) -(define* (slim-service #:key (slim slim) ;deprecated - (allow-empty-passwords? #t) auto-login? - (default-user "") - (theme %default-slim-theme) - (theme-name %default-slim-theme-name) - (xauth xauth) (shepherd shepherd) - (auto-login-session #f) - (startx (xorg-start-command))) +(define-deprecated (slim-service #:key (slim slim) + (allow-empty-passwords? #t) auto-login? + (default-user "") + (theme %default-slim-theme) + (theme-name %default-slim-theme-name) + (xauth xauth) (shepherd shepherd) + (auto-login-session #f) + (startx (xorg-start-command))) + slim-service-type "Return a service that spawns the SLiM graphical login manager, which in turn starts the X display server with @var{startx}, a command as returned by @code{xorg-start-command}. @@ -625,10 +628,10 @@ makes the good ol' XlockMore usable." gdm-configuration? (gdm gdm-configuration-gdm (default gdm)) (allow-empty-passwords? gdm-configuration-allow-empty-passwords? (default #t)) - (allow-root? gdm-configuration-allow-root? (default #t)) (auto-login? gdm-configuration-auto-login? (default #f)) (default-user gdm-configuration-default-user (default #f)) - (x-server gdm-configuration-x-server)) + (x-server gdm-configuration-x-server + (default (xorg-wrapper)))) (define (gdm-etc-service config) (define gdm-configuration-file @@ -680,18 +683,15 @@ makes the good ol' XlockMore usable." (auth (list (pam-entry (control "required") (module "pam_permit.so"))))) - (unix-pam-service - "gdm-password" - #:allow-empty-passwords? (gdm-configuration-allow-empty-passwords? config) - #:allow-root? (gdm-configuration-allow-root? config)))) + (unix-pam-service "gdm-password" + #:allow-empty-passwords? + (gdm-configuration-allow-empty-passwords? config)))) (define (gdm-shepherd-service config) (list (shepherd-service (documentation "Xorg display server (GDM)") (provision '(xorg-server)) (requirement '(dbus-system user-processes host-name udev)) - ;; While this service isn't working properly, turn off auto-start. - (auto-start? #f) (start #~(lambda () (fork+exec-command (list #$(file-append (gdm-configuration-gdm config) @@ -722,14 +722,20 @@ makes the good ol' XlockMore usable." (service-extension etc-service-type gdm-etc-service) (service-extension dbus-root-service-type - (compose list gdm-configuration-gdm)))))) + (compose list + gdm-configuration-gdm)))) + (default-value (gdm-configuration)) + (description + "Run the GNOME Desktop Manager (GDM), a program that allows +you to log in in a graphical session, whether or not you use GNOME."))) ;; This service isn't working yet; it gets as far as starting to run the ;; greeter from gnome-shell but doesn't get any further. It is here because ;; it doesn't hurt anyone and perhaps it inspires someone to fix it :) -(define* (gdm-service #:key (gdm gdm) - (allow-empty-passwords? #t) - (x-server (xorg-wrapper))) +(define-deprecated (gdm-service #:key (gdm gdm) + (allow-empty-passwords? #t) + (x-server (xorg-wrapper))) + gdm-service-type "Return a service that spawns the GDM graphical login manager, which in turn starts the X display server with @var{X}, a command as returned by @code{xorg-wrapper}. |