summaryrefslogtreecommitdiff
path: root/tw/system
diff options
context:
space:
mode:
authorTimo Wilken2023-09-02 19:01:19 +0200
committerTimo Wilken2023-09-02 19:01:19 +0200
commitbbae3afed3ea053eed39aec7b5fe4c04b0afbde8 (patch)
tree406498695a198000d28f63048f1abbafd18300a2 /tw/system
parentfe48c583102c941dc41609f3e9172fdf0d9c5ce8 (diff)
Enable scanning using sane-airscan + ipp-usb
This allows using my scanner properly, since I haven't connected it to the network.
Diffstat (limited to 'tw/system')
-rw-r--r--tw/system/lap.scm18
1 files changed, 14 insertions, 4 deletions
diff --git a/tw/system/lap.scm b/tw/system/lap.scm
index eb4b7006..d840ac1f 100644
--- a/tw/system/lap.scm
+++ b/tw/system/lap.scm
@@ -14,10 +14,10 @@
#:use-module ((guix utils) #:select (substitute-keyword-arguments))
#:use-module ((nongnu packages linux)
#:prefix nongnu:) ; don't interfere with (gnu packages linux)
- #:use-module (nongnu packages scanner)
#:use-module (nongnu system linux-initrd)
#:use-module (nonguix licenses)
#:use-module (tw channels)
+ #:use-module (tw packages scanner)
#:use-module (tw services wireguard)
#:use-module (tw system))
@@ -245,9 +245,6 @@ support extra features (acr, pmu, gr).")
cups docker mit-krb5
;; File systems
dosfstools mtools ntfs-3g
- ;; Printing and scanning
- ;; SANE doesn't detect my scanner without brscan4's etc/sane.d/dll.conf.
- brscan4
;; Desktop and drivers
;; FIXME: lightdm depends on python-2, but the build throws an
;; error that python2 is not supported.
@@ -385,6 +382,16 @@ support extra features (acr, pmu, gr).")
(call-with-output-file "/sys/class/backlight/intel_backlight/brightness"
(cut display max-brightness <>))))))))))
+ (simple-service 'scanning-services shepherd-root-service-type
+ (list
+ (shepherd-service
+ (documentation "Expose USB scanners over IPP.")
+ (provision '(ipp-usb))
+ (requirement '(networking)) ; only on localhost, though
+ (start #~(make-forkexec-constructor
+ (list #$(file-append ipp-usb "/bin/ipp-usb") "standalone")))
+ (stop #~(make-kill-destructor)))))
+
(extra-special-file "/etc/guix/machines.scm"
(scheme-file "machines.scm"
#~(let ((lud (build-machine
@@ -417,6 +424,9 @@ support extra features (acr, pmu, gr).")
(list lud))))))
(modify-services (append %system-channel-services %desktop-services)
+ ;; Let sane find the airscan backend. ipp-usb needs to be running separately.
+ (sane-service-type _ => sane-backends/airscan)
+
(gdm-service-type
config =>
(gdm-configuration