Printing: Difference between revisions
Improve formatting, add more syntax highlighting, add more links (to packages/options) |
Marshmallow (talk | contribs) Added note about IPP-over-USB |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 33: | Line 33: | ||
Discovery is done via the opened UDP port <code>5353</code>. Printers should get automatically detected and visible in your printer configuration client. | Discovery is done via the opened UDP port <code>5353</code>. Printers should get automatically detected and visible in your printer configuration client. | ||
=== Enable auto-discovery of USB printers === | |||
Some printers can be automatically discovered with IPP-over-USB. To discover these printers as a locally accessible network printer/scanner, add the following to your system configuration:<syntaxhighlight lang="nix"> | |||
services.ipp-usb.enable = true; | |||
</syntaxhighlight> | |||
=== Adding printers === | === Adding printers === | ||
| Line 142: | Line 147: | ||
The <code>model</code> string is the first column. For example, for the Samsung SCX-4300 series, set <syntaxhighlight inline lang="nix">model = "samsung/SCX-4300.ppd";</syntaxhighlight>. | The <code>model</code> string is the first column. For example, for the Samsung SCX-4300 series, set <syntaxhighlight inline lang="nix">model = "samsung/SCX-4300.ppd";</syntaxhighlight>. | ||
=== Allowing printer administration for users === | |||
Users in '''wheel''' or '''lpadmin''' group can administer printers. This can be useful to allow non-admin users access to modify printers in their desktop environment settings. To allow user '''snowflake''' to administer printers you would doː<syntaxhighlight lang="nixos"> | |||
users.users.snowflake = { | |||
isNormalUser = true; | |||
extraGroups = [ | |||
"lpadmin" | |||
]; | |||
... | |||
}; | |||
</syntaxhighlight> | |||
=== Printer sharing === | === Printer sharing === | ||
| Line 363: | Line 380: | ||
'''Solution'''<br /> | '''Solution'''<br /> | ||
Use <syntaxhighlight inline lang="bash">NIXPKGS_ALLOW_UNFREE=1 nix-shell -p hplipWithPlugin --run 'sudo -E hp-setup'</syntaxhighlight> to add the printer. | Use <syntaxhighlight inline lang="bash">NIXPKGS_ALLOW_UNFREE=1 nix-shell -p hplipWithPlugin --run 'sudo -E hp-setup'</syntaxhighlight> to add the printer. | ||
=== Setting up Brother HL-1212W laser printer over the network === | |||
Install the cups-brother-hl1210w package. | |||
Enable auto discovery as [[Printing#Enable auto-discovery of network printers|above]] | |||
Now you should be able to add the printer to your system. If asked to select make and model or PPD, use the PPD for the HL-1250 from https://www.openprinting.org/driver/hl1250 | |||
[[Category:Hardware]] | [[Category:Hardware]] | ||