mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: cups: Add BrowseDNSSDSubTypes directive.
* gnu/services/cups.scm (comma-separated-string-list?) (serialize-comma-separated-string-list): New variables. (cups-configuration)[browse-dns-sd-sub-types]: New field. * doc/guix.texi (Printing Services): Document it.
This commit is contained in:
parent
7ab5c4e0e8
commit
ee0de99454
2 changed files with 21 additions and 0 deletions
|
@ -14248,6 +14248,14 @@ longer required for quotas.
|
|||
Defaults to @samp{#f}.
|
||||
@end deftypevr
|
||||
|
||||
@deftypevr {@code{cups-configuration} parameter} comma-separated-string-list browse-dns-sd-sub-types
|
||||
Specifies a list of DNS-SD sub-types to advertise for each shared printer.
|
||||
For example, @samp{"_cups" "_print"} will tell network clients that both
|
||||
CUPS sharing and IPP Everywhere are supported.
|
||||
|
||||
Defaults to @samp{"_cups"}.
|
||||
@end deftypevr
|
||||
|
||||
@deftypevr {@code{cups-configuration} parameter} browse-local-protocols browse-local-protocols
|
||||
Specifies which protocols to use for local printer sharing.
|
||||
|
||||
|
|
|
@ -83,6 +83,14 @@ (define (multiline-string-list? val)
|
|||
(define (serialize-multiline-string-list field-name val)
|
||||
(for-each (lambda (str) (serialize-field field-name str)) val))
|
||||
|
||||
(define (comma-separated-string-list? val)
|
||||
(and (list? val)
|
||||
(and-map (lambda (x)
|
||||
(and (string? x) (not (string-index x #\,))))
|
||||
val)))
|
||||
(define (serialize-comma-separated-string-list field-name val)
|
||||
(serialize-field field-name (string-join val ",")))
|
||||
|
||||
(define (space-separated-string-list? val)
|
||||
(and (list? val)
|
||||
(and-map (lambda (x)
|
||||
|
@ -489,6 +497,11 @@ (define-configuration cups-configuration
|
|||
(boolean #f)
|
||||
"Specifies whether to purge job history data automatically when it is no
|
||||
longer required for quotas.")
|
||||
(browse-dns-sd-sub-types
|
||||
(comma-separated-string-list (list "_cups"))
|
||||
"Specifies a list of DNS-SD sub-types to advertise for each shared printer.
|
||||
For example, @samp{\"_cups\" \"_print\"} will tell network clients that both
|
||||
CUPS sharing and IPP Everywhere are supported.")
|
||||
(browse-local-protocols
|
||||
(browse-local-protocols 'dnssd)
|
||||
"Specifies which protocols to use for local printer sharing.")
|
||||
|
|
Loading…
Reference in a new issue