Printing: Difference between revisions

imported>ShalokShalom
m ; was needed in my configuration
imported>SuperSamus
Move "Enable autodiscovery" section before "Adding printers"
Line 16: Line 16:


== Configuration ==
== Configuration ==
=== Enable autodiscovery of network printers ===
Most printers manufactured after 2013 support the [https://www.pwg.org/ipp/everywhere.html IPP Everywhere] protocol, i.e. printing without installing drivers. This is notably the case of all WiFi printers marketed as Apple-compatible ([https://support.apple.com/en-ca/HT201311 list]).
To detect these printers, add the following to your system configuration:
<syntaxhighlight lang="nix">
services.avahi = {
  enable = true;
  nssmdns = true;
  openFirewall = true;
};
</syntaxhighlight>
Discovery is done via the opened UDP port <code>5353</code>. Printers should get automatically detected and visible in your printer configuration client.


=== Adding printers ===
=== Adding printers ===
Line 76: Line 91:


Search for other printer drivers in the NixOS package directory: the official list of packages is [https://search.nixos.org/packages here]. Add the driver to {{nixos:option|services.printing.drivers}}, '''not''' {{nixos:option|environment.systemPackages}}.
Search for other printer drivers in the NixOS package directory: the official list of packages is [https://search.nixos.org/packages here]. Add the driver to {{nixos:option|services.printing.drivers}}, '''not''' {{nixos:option|environment.systemPackages}}.
=== Enable autodiscovery of network printers ===
Most printers manufactured after 2013 support the [https://www.pwg.org/ipp/everywhere.html IPP Everywhere] protocol, i.e. printing without installing drivers. This is notably the case of all WiFi printers marketed as Apple-compatible ([https://support.apple.com/en-ca/HT201311 list]).
To detect these printers, add the following to your system configuration:
<syntaxhighlight lang="nix">
services.avahi = {
  enable = true;
  nssmdns = true;
  openFirewall = true;
};
</syntaxhighlight>
Discovery is done via the opened UDP port <code>5353</code>. Printers should get automatically detected and visible in your printer configuration client.


=== Printer sharing ===
=== Printer sharing ===