;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
(default &no-default-value))
;; Meta-data.
- (description service-type-description ;string
- (default #f))
+ (description service-type-description) ;string
(location service-type-location ;<location>
(default (and=> (current-source-location)
source-properties->location))
singleton service type NAME, of which the returned service is an instance."
(let* ((extension (service-extension target identity))
(type (service-type (name name)
- (extensions (list extension)))))
+ (extensions (list extension))
+ (description "This is a simple service."))))
(service type value)))
(define-syntax %modify-service
where TYPE is a service type, such as 'guix-service-type', and VARIABLE is an
identifier that is bound within BODY to the value of the service of that
-TYPE. Consider this example:
+TYPE.
+
+Clauses can also remove services of a given type:
+
+ (delete TYPE)
+
+Consider this example:
(modify-services %base-services
(guix-service-type config =>
(define (provenance-entry config-file)
"Return system entries describing the operating system provenance: the
channels in use and CONFIG-FILE, if it is true."
- (define profile
- (current-profile))
-
(define channels
- (and=> profile profile-channels))
+ (current-channels))
(mbegin %store-monad
(let ((config-file (cond ((string? config-file)
(service-type (name 'startup)
(extensions
(list (service-extension system-service-type hurd-rc-entry)))
- (default-value %hurd-rc-script)))
+ (default-value %hurd-rc-script)
+ (description "This service creates an @file{rc} script in the
+system; that script is responsible for booting the Hurd.")))
(define %hurd-startup-service
;; The service that produces the RC script.
(activate-setuid-programs (list #$@programs))))))
-(define (setuid-program-file-like-deprecated file-like)
- (match file-like
- ((? file-like? program)
- (warning
- (G_ "representing setuid programs with '~a' is \
-deprecated; use 'setuid-program' instead~%") program)
- (setuid-program (program program)))
- ((? setuid-program? program)
- program)))
-
(define setuid-program-service-type
(service-type (name 'setuid-program)
(extensions
setuid-program->activation-gexp)))
(compose concatenate)
(extend (lambda (config extensions)
- (map setuid-program-file-like-deprecated
- (append config extensions))))
+ (append config extensions)))
(description
"Populate @file{/run/setuid-programs} with the specified
-executables, making them setuid-root.")))
+executables, making them setuid and/or setgid.")))
(define (packages->profile-entry packages)
"Return a system entry for the profile containing PACKAGES."