zion/modules/printing.nix

37 lines
612 B
Nix
Raw Normal View History

2019-11-06 23:28:34 +01:00
# CUPS and SANE configuration
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
cups
sane-backends
];
# Enable CUPS with Zeroconf
services.printing = {
enable = true;
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 = {
enable = true;
extraBackends = with pkgs; [ hplip ];
2019-11-06 23:28:34 +01:00
};
services.saned = {
enable = true;
extraConfig = ''
192.168.1.0/24
'';
};
users.users.scanner = {
extraGroups = [ "lp" ];
};
}