diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2019-08-29 23:02:10 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2019-08-30 03:41:42 +0200 |
commit | ee0de9945438cce41ef20e37144f41a8d40cd1ab (patch) | |
tree | 802fb19fd49d1e0ea69c58c73cc5ebd3a2c12cf8 /gnu/services/cups.scm | |
parent | 7ab5c4e0e861cfe979591e1ffab9c6e9f26caa6b (diff) | |
download | guix-ee0de9945438cce41ef20e37144f41a8d40cd1ab.tar.gz |
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.
Diffstat (limited to 'gnu/services/cups.scm')
-rw-r--r-- | gnu/services/cups.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index e77c43bfbf..ace7889fb6 100644 --- a/gnu/services/cups.scm +++ b/gnu/services/cups.scm @@ -83,6 +83,14 @@ (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 @@ requests.") (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.") |