2019-11-06 23:28:34 +01:00
|
|
|
# CUPS and SANE configuration
|
2020-06-09 21:53:20 +02:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2019-11-06 23:28:34 +01:00
|
|
|
|
2020-06-09 21:53:20 +02:00
|
|
|
environment.systemPackages = with pkgs; [ cups sane-backends ];
|
2019-11-06 23:28:34 +01:00
|
|
|
|
|
|
|
# Enable CUPS with Zeroconf
|
|
|
|
services.printing = {
|
|
|
|
enable = true;
|
2020-04-28 20:02:04 +02:00
|
|
|
drivers = with pkgs; [ hplip ];
|
2019-11-06 23:28:34 +01:00
|
|
|
browsing = true;
|
2019-11-22 12:14:46 +01:00
|
|
|
listenAddresses = [ "0.0.0.0:631" ];
|
2019-11-06 23:28:34 +01:00
|
|
|
defaultShared = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable SANE
|
|
|
|
hardware.sane = {
|
2020-06-09 21:53:20 +02:00
|
|
|
enable = true;
|
|
|
|
extraBackends = with pkgs; [ hplip ];
|
2019-11-06 23:28:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
services.saned = {
|
2020-06-09 21:53:20 +02:00
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
2019-11-06 23:28:34 +01:00
|
|
|
192.168.1.0/24
|
2020-05-09 00:22:43 +02:00
|
|
|
10.8.0.2/32
|
2020-06-09 21:53:20 +02:00
|
|
|
'';
|
2019-11-06 23:28:34 +01:00
|
|
|
};
|
|
|
|
|
2020-06-09 21:53:20 +02:00
|
|
|
users.users.scanner = { extraGroups = [ "lp" ]; };
|
2019-11-06 23:28:34 +01:00
|
|
|
|
|
|
|
}
|