summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xp-332.nix
blob: 627401dc65dbe40cedcfb21a799704636e3ad557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
with import <stockholm/lib>;
{ config, pkgs, ... }: {

  environment.etc."utsushi.conf".text = ''
    [devices]
    dev1.udi = esci:networkscan://EPSON79678C.fritz.box:1865
    dev1.model = XP-332
    dev1.vendor = EPSON
  '';

  hardware.sane = {
    enable = true;
    extraBackends = [
      pkgs.utsushi
    ];
  };

  krebs.nixpkgs.allowUnfreePredicate = pkg:
    elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ];

  nixpkgs.overlays = singleton (self: super: {
    utsushi = super.utsushi.override {
      guiSupport = false;
      jpegSupport = false;
      networkSupport = true;
      ocrSupport = false;
      saneSupport = true;
      tiffSupport = true;

      logCategory = "ALL";
      logLevel = "BRIEF";
    };
  });

  services = {
    printing = {
      drivers = [
        pkgs.epson-escpr
      ];
      enable = true;
    };
    saned.enable = true;
  };

}