diff --git a/modules/radix/services/admin.scm b/modules/radix/services/admin.scm index 60ba304..3fee0e0 100644 --- a/modules/radix/services/admin.scm +++ b/modules/radix/services/admin.scm @@ -81,18 +81,17 @@ match those specified. The keyword args alone means that command must be run without arguments.") (setenv maybe-assoc-list - "Keep or set the specified variables. Variables may also be removed by -setting them to #f. If the first character of the value is ‘$’ then the value -to be set is taken from the existing environment variable with the given name. -This options is processed after the default environment variable has been -created.")) + "Set the specified variables. Variables may also be removed by setting them +to #f, or simply exported, by setting them to #t. If the first character of the +value is ‘$’ then the value to be set is taken from the existing environment +variable with the given name.")) (define-syntax-rule (permit entry ...) (permit-statement entry ...)) (define (unset? val) "Tests if VAL is unset." (equal? val (@@ (gnu services configuration) - %unset-value))) + %unset-value))) (define* (if-set val #:optional (proc identity)) "Apply PROC to VAL if VAL is not unset, otherwise returns #f." @@ -152,10 +151,11 @@ without arguments.")) (define (doas-config-file config) (plain-file "doas.conf" (apply string-append - (map (lambda (s) (cond ((permit-statement? s) - (serialize-permit-statement s)) - ((deny-statement? s) - (serialize-deny-statement s)))) + (map (lambda (s) + (cond ((permit-statement? s) + (serialize-permit-statement s)) + ((deny-statement? s) + (serialize-deny-statement s)))) config)))) (define (doas-etc-service config) @@ -171,3 +171,7 @@ without arguments.")) (extend append) (default-value '()) (description "Set /etc/doas.conf"))) + +(define (generate-documentation) + (configuration->documentation 'permit-statement) + (configuration->documentation 'deny-statement))