diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/guix.scm | 4 | ||||
-rw-r--r-- | gnu/services/messaging.scm | 53 | ||||
-rw-r--r-- | gnu/services/shepherd.scm | 30 | ||||
-rw-r--r-- | gnu/services/ssh.scm | 7 |
4 files changed, 36 insertions, 58 deletions
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index 17599193e3..c438da531c 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -171,7 +171,7 @@ (parallel-hooks guix-build-coordinator-configuration-parallel-hooks (default '())) (guile guix-build-coordinator-configuration-guile - (default guile-3.0-latest)) + (default guile-next)) (extra-environment-variables guix-build-coordinator-configuration-extra-environment-variables (default '()))) @@ -246,7 +246,7 @@ client-communication-uri-string (hooks '()) (parallel-hooks '()) - (guile guile-3.0)) + (guile guile-next)) (program-file "start-guix-build-coordinator" (with-extensions (cons guix-build-coordinator-package diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 7505810e7c..9702170b3e 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-2020, 2022, 2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2017-2020, 2022-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr> ;;; ;;; This file is part of GNU Guix. @@ -857,39 +857,24 @@ string, you could instantiate a prosody service like this: ;; on 'networking'. (requirement '(user-processes networking)) - (start #~(if (defined? 'make-inetd-constructor) - - (make-inetd-constructor - (list #$bitlbee* "-I" "-c" #$conf) - (list (endpoint - (addrinfo:addr - (car (getaddrinfo #$interface - #$(number->string port) - (logior AI_NUMERICHOST - AI_NUMERICSERV)))))) - #:requirements '#$requirement - #:service-name-stem "bitlbee" - #:user "bitlbee" #:group "bitlbee" - - ;; Allow 'bitlbee-purple' to use libpurple plugins. - #:environment-variables - (list (string-append "PURPLE_PLUGIN_PATH=" - #$plugins "/lib/purple-2") - "GUIX_LOCPATH=/run/current-system/locale")) - - (make-forkexec-constructor - (list #$(file-append bitlbee "/sbin/bitlbee") - "-n" "-F" "-u" "bitlbee" "-c" #$conf) - - ;; Allow 'bitlbee-purple' to use libpurple plugins. - #:environment-variables - (list (string-append "PURPLE_PLUGIN_PATH=" - #$plugins "/lib/purple-2")) - - #:pid-file "/var/run/bitlbee.pid"))) - (stop #~(if (defined? 'make-inetd-destructor) - (make-inetd-destructor) - (make-kill-destructor))))))))) + (start #~(make-inetd-constructor + (list #$bitlbee* "-I" "-c" #$conf) + (list (endpoint + (addrinfo:addr + (car (getaddrinfo #$interface + #$(number->string port) + (logior AI_NUMERICHOST + AI_NUMERICSERV)))))) + #:requirements '#$requirement + #:service-name-stem "bitlbee" + #:user "bitlbee" #:group "bitlbee" + + ;; Allow 'bitlbee-purple' to use libpurple plugins. + #:environment-variables + (list (string-append "PURPLE_PLUGIN_PATH=" + #$plugins "/lib/purple-2") + "GUIX_LOCPATH=/run/current-system/locale"))) + (stop #~(make-inetd-destructor)))))))) (define %bitlbee-accounts ;; User group and account to run BitlBee. diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 8e122f1aab..5ebac129ce 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -183,7 +183,6 @@ DEFAULT is given, use it as the service's default value." (define %default-modules ;; Default set of modules visible in a service's file. `((shepherd service) - (oop goops) ((guix build utils) #:hide (delete)) (guix build syscalls))) @@ -300,10 +299,10 @@ stored." #~(begin (use-modules #$@(shepherd-service-modules service)) - (make <service> - #:docstring '#$(shepherd-service-documentation service) - #:provides '#$(shepherd-service-provision service) - #:requires '#$(shepherd-service-requirement service) + (service + '#$(shepherd-service-provision service) + #:documentation '#$(shepherd-service-documentation service) + #:requirement '#$(shepherd-service-requirement service) ;; The 'one-shot?' slot is new in Shepherd 0.6.0. ;; Older versions ignore it. @@ -313,7 +312,7 @@ stored." #:start #$(shepherd-service-start service) #:stop #$(shepherd-service-stop service) #:actions - (make-actions + (actions #$@(map (match-lambda (($ <shepherd-action> name proc doc) #~(#$name #$doc #$proc))) @@ -338,7 +337,6 @@ and return the resulting '.go' file. SHEPHERD is used as shepherd package." ;; Do the same as the Shepherd's 'load-in-user-module'. (let ((env (make-fresh-user-module))) - (module-use! env (resolve-interface '(oop goops))) (module-use! env (resolve-interface '(shepherd service))) (with-target #$(or target #~%host-type) (lambda _ @@ -401,25 +399,17 @@ as shepherd package." ;; than a kernel panic. (call-with-error-handling (lambda () - (apply register-services - (parameterize ((current-warning-port - (%make-void-port "w"))) - (map load-compiled '#$(map scm->go files)))))) + (register-services + (parameterize ((current-warning-port + (%make-void-port "w"))) + (map load-compiled '#$(map scm->go files)))))) (format #t "starting services...~%") (let ((services-to-start '#$(append-map shepherd-service-provision (filter shepherd-service-auto-start? services)))) - (if (defined? 'start-in-the-background) - (start-in-the-background services-to-start) - (for-each (lambda (service) ;pre-0.9.0 compatibility - (guard (c ((service-error? c) - (format (current-error-port) - "failed to start service '~a'~%" - service))) - (start service))) - services-to-start)) + (start-in-the-background services-to-start) ;; Hang up stdin. At this point, we assume that 'start' methods ;; that required user interaction on the console (e.g., diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 0abecd6b42..f759c5cf6e 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014-2019, 2022, 2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014-2019, 2022-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> @@ -592,7 +592,10 @@ of user-name/file-like tuples." (list (shepherd-service (documentation "OpenSSH server.") - (requirement '(pam syslogd loopback)) + + ;; On the Hurd, this can only be started after pfinet is up, hence + ;; the dependency on 'networking'. + (requirement '(pam syslogd loopback networking)) (provision '(ssh-daemon ssh sshd)) (start #~(if #$inetd-style? |