{ 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 ]; # Set default paper size via CUPS configuration extraConf = '' DefaultPaperSize Letter ''; }; # Enable Avahi for printer discovery (IPv4 only) services.avahi = { enable = 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.allowedUDPPorts = [ 5353 ]; }