Set up Cups and SANE
This commit is contained in:
36
modules/printing.nix
Normal file
36
modules/printing.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
# 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_3_18_5 ];
|
||||
browsing = true;
|
||||
listenAddresses = [ "*: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" ];
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user