diff options
author | makefu <github@syntax-fehler.de> | 2017-08-02 11:49:27 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-08-02 11:56:28 +0200 |
commit | a6b5b8dffd6023835e0fbb34c9d13364d9a4f1b3 (patch) | |
tree | bc77d09931b11317ce9551e35e1a066094cb70c0 /makefu/2configs/printer.nix | |
parent | d0d10918cc344c8d8b00ed3c8ecee59d214f6e64 (diff) |
ma printer: add support for magicolor
Diffstat (limited to 'makefu/2configs/printer.nix')
-rw-r--r-- | makefu/2configs/printer.nix | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/makefu/2configs/printer.nix b/makefu/2configs/printer.nix index 509ed512d..0865a0841 100644 --- a/makefu/2configs/printer.nix +++ b/makefu/2configs/printer.nix @@ -1,15 +1,30 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: -{ +let + mainUser = config.krebs.build.user.name; +in { services.printing = { enable = true; drivers = [ pkgs.samsungUnifiedLinuxDriver - pkgs.cups-dymo + pkgs.cups-dymo # dymo labelwriter + pkgs.foo2zjs # magicolor 1690mf ]; }; # scanners are printers just in reverse anyway - hardware.sane.enable = true; - hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ]; + services.saned.enable = true; + users.users."${mainUser}".extraGroups = [ "scanner" ]; + + hardware.sane = { + enable = true; + extraBackends = [ pkgs.samsungUnifiedLinuxDriver ]; + + # $ scanimage -p --format=jpg --mode=Gray --source="Automatic Document Feeder" -v --batch="lol%d.jpg" --resolution=150 + + # requires 'sane-extra', scan via: + extraConfig."magicolor" = '' + net 10.42.20.30 0x2098 + ''; # 10.42.20.30: uhrenkind.shack magicolor 1690mf + }; } |