2dprinting
This commit is contained in:
parent
aafae51227
commit
3c527c8109
1 changed files with 18 additions and 4 deletions
|
|
@ -1,13 +1,27 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# Enable printing services with dynamic detection
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = [
|
||||||
|
pkgs.hplipWithPlugin # HP printer driver with proprietary plugin support
|
||||||
|
pkgs.brlaser # Brother printer drivers
|
||||||
|
];
|
||||||
|
|
||||||
services.printing.enable = true;
|
# Set default paper size via CUPS configuration
|
||||||
services.printing.drivers = [ pkgs.brlaser ];
|
extraConf = ''
|
||||||
|
DefaultPaperSize Letter
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable Avahi for printer discovery (IPv4 only)
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns = true;
|
publish.enable = true;
|
||||||
|
publish.addresses = true;
|
||||||
|
nssmdns4 = true; # Enable mDNS for IPv4
|
||||||
|
nssmdns6 = false; # Disable mDNS for IPv6 to prevent timeouts
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 631 ];
|
networking.firewall.allowedTCPPorts = [ 631 ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue