zion/modules/printing.nix

31 lines
548 B
Nix

# CUPS and SANE configuration
{ config, pkgs, lib, ... }:
{
# Enable CUPS with Zeroconf
services.printing = {
enable = true;
drivers = with pkgs; [ hplip_3_18_5 ];
browsing = true;
listenAddresses = [ "0.0.0.0:631" ];
defaultShared = true;
};
# Enable SANE
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ hplip_3_18_5 ];
};
services.saned = {
enable = true;
extraConfig = ''
192.168.1.0/24
'';
};
users.users.scanner = {
extraGroups = [ "lp" ];
};
}