1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6 options = {
7
8 hardware.sane.dsseries.enable =
9 mkEnableOption (lib.mdDoc "Brother DSSeries scan backend") // {
10 description = lib.mdDoc ''
11 When enabled, will automatically register the "dsseries" SANE backend.
12
13 This supports the Brother DSmobile scanner series, including the
14 DS-620, DS-720D, DS-820W, and DS-920DW scanners.
15 '';
16 };
17 };
18
19 config = mkIf (config.hardware.sane.enable && config.hardware.sane.dsseries.enable) {
20
21 hardware.sane.extraBackends = [ pkgs.dsseries ];
22 services.udev.packages = [ pkgs.dsseries ];
23 boot.kernelModules = [ "sg" ];
24
25 };
26}