Message ID | 20210703205015.13862-1-brice@waegenei.re |
---|---|
State | New |
Headers | show |
Series | [bug#49366] services: bluetooth: Add 'extra-config' field. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Hello Brice, > * gnu/services/desktop.scm (bluetooth-configuration): Add 'extra-config' > field. > (bluetooth-configuration-file): Use it. I guess you have a specific use case in mind, adding a short documentation about the <bluetooth-configuration> and the new extra-config field could be nice here. Otherwise it seems fine to me. Thanks, Mathieu
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index cd800fcc2b..7109d5d476 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -400,14 +400,18 @@ site} for more information." bluetooth-configuration make-bluetooth-configuration bluetooth-configuration? (bluez bluetooth-configuration-bluez (default bluez)) - (auto-enable? bluetooth-configuration-auto-enable? (default #f))) + (auto-enable? bluetooth-configuration-auto-enable? (default #f)) + (extra-config bluetooth-configuration-extra-config ;list of strings + (default '()))) (define (bluetooth-configuration-file config) "Return a configuration file for the systemd bluetooth service, as a string." - (string-append - "[Policy]\n" - "AutoEnable=" (bool (bluetooth-configuration-auto-enable? - config)))) + (string-concatenate + (cons* + "[Policy]\n" + "AutoEnable=" (bool (bluetooth-configuration-auto-enable? + config)) "\n" + (bluetooth-configuration-extra-config config)))) (define (bluetooth-directory config) (computed-file "etc-bluetooth"