https://nixos.wiki/wiki/Printing
Maybe making once a video how to install printers on NixOS? For the rest, great system, but I need my HP printer-scanner, so back to Arco Linux.
Driver-based printing
- Add to
/etc/nixos/configuration.nix
:
{ … services.printing.enable = true; services.printing.drivers = [ YOUR_DRIVER ]; … }
where YOUR_DRIVER
is the driver package appropriate for your printer. Commonly used driver packages include:
- pkgs.gutenprint — Drivers for many different printers from many different vendors.
- pkgs.gutenprintBin — Additional, binary-only drivers for some printers.
- pkgs.hplip — Drivers for HP printers.
- pkgs.hplipWithPlugin — Drivers for HP printers, with the proprietary plugin. Use
NIXPKGS_ALLOW_UNFREE=1 nix-shell -p hplipWithPlugin --run ‘sudo -E hp-setup’ =syntax error
to add the printer, regular CUPS UI doesn’t seem to work.
- pkgs.postscript-lexmark — Postscript drivers for Lexmark
- pkgs.samsung-unified-linux-driver — Proprietary Samsung Drivers
- pkgs.splix — Drivers for printers supporting SPL (Samsung Printer Language).
- pkgs.brlaser — Drivers for some Brother printers
- pkgs.brgenml1lpr and pkgs.brgenml1cupswrapper — Generic drivers for more Brother printers [1]
- pkgs.cnijfilter2 — Drivers for some Canon Pixma devices (Proprietary driver)
- Some printers might be supported by built-in CUPS drivers.
- Search for other printer drivers in the NixOS package directory: the official list of packages is here but does not list unfree packages (which is the case of many printer drivers). To list unfree packages, see The appropriate FAQ entry for installing unfree packages.(Add the driver to
services.printing.drivers
, notenvironment.systemPackages
.)
- Rebuild:
$ sudo nixos-rebuild switch
CUPS will be started automatically.
3. Navigate to http://localhost:631/ in a web browser to configure printers. Alternatively, some desktop environments may provide GUI interfaces for adding printers, for example system-config-printer
.You may need to authenticate when you add the printer. Search the web for e.g. “cups add printer” for further information.