Printing: Difference between revisions
Redchess64 (talk | contribs) add setup info for "Brother HL-1212W". info from @realhb in discord |
m The option 'services.avahi.nssmdns' has been renamed to 'services.avahi.nssmdns4' and 'services.avahi.nssmdns6'. |
||
| (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 150: | Line 167: | ||
services.avahi = { | services.avahi = { | ||
enable = true; | enable = true; | ||
nssmdns4 = true; # for IPv4 (use nssmdns6 for IPv6) | |||
openFirewall = true; | openFirewall = true; | ||
publish = { | publish = { | ||