From bbae3afed3ea053eed39aec7b5fe4c04b0afbde8 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sat, 2 Sep 2023 19:01:19 +0200 Subject: Enable scanning using sane-airscan + ipp-usb This allows using my scanner properly, since I haven't connected it to the network. --- tw/system/lap.scm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'tw/system/lap.scm') 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 -- cgit v1.2.3