Printing: Difference between revisions

Writer (talk | contribs)
mNo edit summary
Nipsy (talk | contribs)
Line 46: Line 46:
};
};
</syntaxhighlight>
</syntaxhighlight>
A similar network based, driverless approach using the very widely supported [https://www.pwg.org/ipp/everywhere.html IPP Everywhere] protocol (thanks to [https://discourse.nixos.org/t/brother-dcp-572dw-wrapper/8113/3 this] Discourse post), would look something like:
<syntaxhighlight lang="nix">
hardware.printers = {
  ensureDefaultPrinter = "Brother_HL-L2340D";
  ensurePrinters = [
    {
      deviceUri = "ipp://192.168.1.20/ipp";
      location = "home";
      name = "Brother_HL-L2340D";
      model = "everywhere";
    }
  ];
};
</syntaxhighlight>
You can run <code>lpinfo -m</code> to ensure you have the <code>everywhere</code> driver currently available.


To add a local printer, connected via USB, change the <code>deviceUri</code> to a USB address and optionally define which driver to use by adding the <code>model</code> option.
To add a local printer, connected via USB, change the <code>deviceUri</code> to a USB address and optionally define which driver to use by adding the <code>model</code> option.