diff options
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/services/base.scm | 32 | ||||
| -rw-r--r-- | gnu/services/networking.scm | 6 | ||||
| -rw-r--r-- | gnu/services/shepherd.scm | 14 | ||||
| -rw-r--r-- | gnu/system/install.scm | 6 | ||||
| -rw-r--r-- | gnu/system/linux-container.scm | 7 | ||||
| -rw-r--r-- | gnu/system/mapped-devices.scm | 5 |
6 files changed, 47 insertions, 23 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 945b5466072..f6a490f7121 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> | 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> |
| 4 | ;;; Copyright © 2015, 2016, 2020 Mark H Weaver <mhw@netris.org> | 4 | ;;; Copyright © 2015, 2016, 2020 Mark H Weaver <mhw@netris.org> |
| 5 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> | 5 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| @@ -279,7 +279,9 @@ system objects."))) | |||
| 279 | 279 | ||
| 280 | (define root-file-system-service-type | 280 | (define root-file-system-service-type |
| 281 | (shepherd-service-type 'root-file-system | 281 | (shepherd-service-type 'root-file-system |
| 282 | (const %root-file-system-shepherd-service))) | 282 | (const %root-file-system-shepherd-service) |
| 283 | (description "Take care of syncing the root file | ||
| 284 | system and of remounting it read-only when the system shuts down."))) | ||
| 283 | 285 | ||
| 284 | (define (root-file-system-service) | 286 | (define (root-file-system-service) |
| 285 | "Return a service whose sole purpose is to re-mount read-only the root file | 287 | "Return a service whose sole purpose is to re-mount read-only the root file |
| @@ -570,7 +572,9 @@ down."))) | |||
| 570 | (requirement '(udev)) | 572 | (requirement '(udev)) |
| 571 | (provision '(trng)) | 573 | (provision '(trng)) |
| 572 | (start #~(make-forkexec-constructor '#$rngd-command)) | 574 | (start #~(make-forkexec-constructor '#$rngd-command)) |
| 573 | (stop #~(make-kill-destructor)))))) | 575 | (stop #~(make-kill-destructor)))) |
| 576 | (description "Run the @command{rngd} random number generation daemon to | ||
| 577 | supply entropy to the kernel's pool."))) | ||
| 574 | 578 | ||
| 575 | (define* (rngd-service #:key | 579 | (define* (rngd-service #:key |
| 576 | (rng-tools rng-tools) | 580 | (rng-tools rng-tools) |
| @@ -597,7 +601,8 @@ to add @var{device} to the kernel's entropy pool. The service will fail if | |||
| 597 | (provision '(host-name)) | 601 | (provision '(host-name)) |
| 598 | (start #~(lambda _ | 602 | (start #~(lambda _ |
| 599 | (sethostname #$name))) | 603 | (sethostname #$name))) |
| 600 | (one-shot? #t))))) | 604 | (one-shot? #t))) |
| 605 | (description "Initialize the machine's host name."))) | ||
| 601 | 606 | ||
| 602 | (define (host-name-service name) | 607 | (define (host-name-service name) |
| 603 | "Return a service that sets the host name to @var{name}." | 608 | "Return a service that sets the host name to @var{name}." |
| @@ -626,7 +631,8 @@ to add @var{device} to the kernel's entropy pool. The service will fail if | |||
| 626 | (display 1 port)))) | 631 | (display 1 port)))) |
| 627 | #t)) | 632 | #t)) |
| 628 | (stop #~(const #f))))) | 633 | (stop #~(const #f))))) |
| 629 | #t)) ;default to UTF-8 | 634 | #t ;default to UTF-8 |
| 635 | (description "Ensure the Linux virtual terminals run in UTF-8 mode."))) | ||
| 630 | 636 | ||
| 631 | (define console-keymap-service-type | 637 | (define console-keymap-service-type |
| 632 | (shepherd-service-type | 638 | (shepherd-service-type |
| @@ -638,7 +644,10 @@ to add @var{device} to the kernel's entropy pool. The service will fail if | |||
| 638 | (start #~(lambda _ | 644 | (start #~(lambda _ |
| 639 | (zero? (system* #$(file-append kbd "/bin/loadkeys") | 645 | (zero? (system* #$(file-append kbd "/bin/loadkeys") |
| 640 | #$@files)))) | 646 | #$@files)))) |
| 641 | (respawn? #f))))) | 647 | (respawn? #f))) |
| 648 | (description "@emph{This service is deprecated in favor of the | ||
| 649 | @code{keyboard-layout} field of @code{operating-system}.} Load the given list | ||
| 650 | of console keymaps with @command{loadkeys}."))) | ||
| 642 | 651 | ||
| 643 | (define-deprecated (console-keymap-service #:rest files) | 652 | (define-deprecated (console-keymap-service #:rest files) |
| 644 | #f | 653 | #f |
| @@ -1341,7 +1350,9 @@ Service Switch}, for an example." | |||
| 1341 | (pid (spawn))) | 1350 | (pid (spawn))) |
| 1342 | (umask mask) | 1351 | (umask mask) |
| 1343 | pid)))) | 1352 | pid)))) |
| 1344 | (stop #~(make-kill-destructor)))))) | 1353 | (stop #~(make-kill-destructor)))) |
| 1354 | (description "Run the syslog daemon, @command{syslogd}, which is | ||
| 1355 | responsible for logging system messages."))) | ||
| 1345 | 1356 | ||
| 1346 | ;; Snippet adapted from the GNU inetutils manual. | 1357 | ;; Snippet adapted from the GNU inetutils manual. |
| 1347 | (define %default-syslog.conf | 1358 | (define %default-syslog.conf |
| @@ -2207,7 +2218,8 @@ instance." | |||
| 2207 | (when device | 2218 | (when device |
| 2208 | (restart-on-EINTR (swapoff device))) | 2219 | (restart-on-EINTR (swapoff device))) |
| 2209 | #f))) | 2220 | #f))) |
| 2210 | (respawn? #f)))))) | 2221 | (respawn? #f)))) |
| 2222 | (description "Turn on the virtual memory swap area."))) | ||
| 2211 | 2223 | ||
| 2212 | (define (swap-service device) | 2224 | (define (swap-service device) |
| 2213 | "Return a service that uses @var{device} as a swap device." | 2225 | "Return a service that uses @var{device} as a swap device." |
| @@ -2321,7 +2333,9 @@ This service is not part of @var{%base-services}." | |||
| 2321 | (requirement '(user-processes udev dbus-system)) | 2333 | (requirement '(user-processes udev dbus-system)) |
| 2322 | (provision (list (symbol-append 'term- (string->symbol virtual-terminal)))) | 2334 | (provision (list (symbol-append 'term- (string->symbol virtual-terminal)))) |
| 2323 | (start #~(make-forkexec-constructor #$kmscon-command)) | 2335 | (start #~(make-forkexec-constructor #$kmscon-command)) |
| 2324 | (stop #~(make-kill-destructor))))))) | 2336 | (stop #~(make-kill-destructor))))) |
| 2337 | (description "Start the @command{kmscon} virtual terminal emulator for the | ||
| 2338 | Linux @dfn{kernel mode setting} (KMS)."))) | ||
| 2325 | 2339 | ||
| 2326 | (define-record-type* <static-networking> | 2340 | (define-record-type* <static-networking> |
| 2327 | static-networking make-static-networking | 2341 | static-networking make-static-networking |
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 44754781c14..dd4061341e3 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> | 4 | ;;; Copyright © 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> |
| 5 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> | 5 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> |
| @@ -283,7 +283,9 @@ fe80::1%lo0 apps.facebook.com\n") | |||
| 283 | (and (zero? (cdr (waitpid pid))) | 283 | (and (zero? (cdr (waitpid pid))) |
| 284 | (read-pid-file #$pid-file))))) | 284 | (read-pid-file #$pid-file))))) |
| 285 | (stop #~(make-kill-destructor)))) | 285 | (stop #~(make-kill-destructor)))) |
| 286 | isc-dhcp)) | 286 | isc-dhcp |
| 287 | (description "Run @command{dhcp}, a Dynamic Host Configuration | ||
| 288 | Protocol (DHCP) client, on all the non-loopback network interfaces."))) | ||
| 287 | 289 | ||
| 288 | (define-deprecated (dhcp-client-service #:key (dhcp isc-dhcp)) | 290 | (define-deprecated (dhcp-client-service #:key (dhcp isc-dhcp)) |
| 289 | dhcp-client-service-type | 291 | dhcp-client-service-type |
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 1faeb350dfb..d2f97762888 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> | 3 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> |
| 4 | ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au> | 4 | ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au> |
| 5 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | 5 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
| @@ -119,23 +119,25 @@ ensuring they are started and stopped in the right order."))) | |||
| 119 | (service shepherd-root-service-type '())) | 119 | (service shepherd-root-service-type '())) |
| 120 | 120 | ||
| 121 | (define-syntax shepherd-service-type | 121 | (define-syntax shepherd-service-type |
| 122 | (syntax-rules () | 122 | (syntax-rules (description) |
| 123 | "Return a <service-type> denoting a simple shepherd service--i.e., the type | 123 | "Return a <service-type> denoting a simple shepherd service--i.e., the type |
| 124 | for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else. When | 124 | for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else. When |
| 125 | DEFAULT is given, use it as the service's default value." | 125 | DEFAULT is given, use it as the service's default value." |
| 126 | ((_ service-name proc default) | 126 | ((_ service-name proc default (description text)) |
| 127 | (service-type | 127 | (service-type |
| 128 | (name service-name) | 128 | (name service-name) |
| 129 | (extensions | 129 | (extensions |
| 130 | (list (service-extension shepherd-root-service-type | 130 | (list (service-extension shepherd-root-service-type |
| 131 | (compose list proc)))) | 131 | (compose list proc)))) |
| 132 | (default-value default))) | 132 | (default-value default) |
| 133 | ((_ service-name proc) | 133 | (description text))) |
| 134 | ((_ service-name proc (description text)) | ||
| 134 | (service-type | 135 | (service-type |
| 135 | (name service-name) | 136 | (name service-name) |
| 136 | (extensions | 137 | (extensions |
| 137 | (list (service-extension shepherd-root-service-type | 138 | (list (service-extension shepherd-root-service-type |
| 138 | (compose list proc)))))))) | 139 | (compose list proc)))) |
| 140 | (description text))))) | ||
| 139 | 141 | ||
| 140 | (define %default-imported-modules | 142 | (define %default-imported-modules |
| 141 | ;; Default set of modules imported for a service's consumption. | 143 | ;; Default set of modules imported for a service's consumption. |
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index e7534634739..7fa5c15324a 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> | 4 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> |
| 5 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> | 5 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
| @@ -212,7 +212,9 @@ the given target.") | |||
| 212 | ;; 'user-processes' doesn't depend on us. The 'user-file-systems' | 212 | ;; 'user-processes' doesn't depend on us. The 'user-file-systems' |
| 213 | ;; service will unmount TARGET eventually. | 213 | ;; service will unmount TARGET eventually. |
| 214 | (delete-file-recursively | 214 | (delete-file-recursively |
| 215 | (string-append target #$%backing-directory)))))))) | 215 | (string-append target #$%backing-directory)))))) |
| 216 | (description "Make the store copy-on-write, with writes going to \ | ||
| 217 | the given target."))) | ||
| 216 | 218 | ||
| 217 | (define (cow-store-service) | 219 | (define (cow-store-service) |
| 218 | "Return a service that makes the store copy-on-write, such that writes go to | 220 | "Return a service that makes the store copy-on-write, such that writes go to |
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index 4a9cd0efe2c..e6fd0f1315f 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> | 2 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> |
| 3 | ;;; Copyright © 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net> | 4 | ;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net> |
| 5 | ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> | 5 | ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> |
| 6 | ;;; Copyright © 2020 Google LLC | 6 | ;;; Copyright © 2020 Google LLC |
| @@ -76,7 +76,10 @@ from OS that are needed on the bare metal and not in a container." | |||
| 76 | doing anything.") | 76 | doing anything.") |
| 77 | (provision '(loopback networking)) | 77 | (provision '(loopback networking)) |
| 78 | (start #~(const #t)))) | 78 | (start #~(const #t)))) |
| 79 | #f)) | 79 | #f |
| 80 | (description "Provide loopback and networking without actually doing | ||
| 81 | anything. This service is used by guest systems running in containers, where | ||
| 82 | networking support is provided by the host."))) | ||
| 80 | 83 | ||
| 81 | (define %nscd-container-caches | 84 | (define %nscd-container-caches |
| 82 | ;; Similar to %nscd-default-caches but with smaller cache sizes. This allows | 85 | ;; Similar to %nscd-default-caches but with smaller cache sizes. This allows |
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index 559c27bb28c..518dbc4fe83 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> | 3 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org> | 4 | ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org> |
| 5 | ;;; | 5 | ;;; |
| @@ -130,7 +130,8 @@ specifications to 'targets'." | |||
| 130 | (documentation "Map a device node using Linux's device mapper.") | 130 | (documentation "Map a device node using Linux's device mapper.") |
| 131 | (start #~(lambda () #$(open source targets))) | 131 | (start #~(lambda () #$(open source targets))) |
| 132 | (stop #~(lambda _ (not #$(close source targets)))) | 132 | (stop #~(lambda _ (not #$(close source targets)))) |
| 133 | (respawn? #f)))))) | 133 | (respawn? #f)))) |
| 134 | (description "Map a device node using Linux's device mapper."))) | ||
| 134 | 135 | ||
| 135 | (define (device-mapping-service mapped-device) | 136 | (define (device-mapping-service mapped-device) |
| 136 | "Return a service that sets up @var{mapped-device}." | 137 | "Return a service that sets up @var{mapped-device}." |
