Skip to content

Instantly share code, notes, and snippets.

@jeremiehuchet
Created February 12, 2020 14:41
Show Gist options
  • Select an option

  • Save jeremiehuchet/f0cc15b4ab488e4ff1156c39df5e06a8 to your computer and use it in GitHub Desktop.

Select an option

Save jeremiehuchet/f0cc15b4ab488e4ff1156c39df5e06a8 to your computer and use it in GitHub Desktop.
Setup HP DeskJet Pro 9600 printer on nixos

HP DeskJet Pro 9600

In /etc/nixos/configuration.nix:

services.printing.enable = true;
services.printing.drivers = [ pkgs.hplip ];
services.printing.startWhenNeeded = true; # optional

users.users.<someone>.extraGroups = [ ... "lp" ... ];

Run nix run nixos.hplip -c hp-makeuri <ip address or name of the printer>:

...
CUPS URI: hp:/net/Officejet_Pro_8600?ip=<ip address or name of the printer>
...

Open browser at http://localhost:631/admin,
Then Add printer,
Choose local printers : [x] HP Printer (HPLIP), Next,
Fill Connection field with previously generated URI: hp:/net/Officejet_Pro_8600?ip=<ip address or name of the printer>,
Next, Fill in name / desc / etc... fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment