32 lines
604 B
Nix
32 lines
604 B
Nix
# 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 ];
|
|
browsing = true;
|
|
listenAddresses = [ "0.0.0.0:631" ];
|
|
defaultShared = true;
|
|
};
|
|
|
|
# Enable SANE
|
|
hardware.sane = {
|
|
enable = true;
|
|
extraBackends = with pkgs; [ hplip ];
|
|
};
|
|
|
|
services.saned = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
192.168.1.0/24
|
|
10.8.0.2/32
|
|
'';
|
|
};
|
|
|
|
users.users.scanner = { extraGroups = [ "lp" ]; };
|
|
|
|
}
|