config/hardware/printer/hp-laserjet-p1005.nix

18 lines
624 B
Nix
Raw Normal View History

2023-06-30 12:26:00 +02:00
{ lib, pkgs, ... }:
{
# https://nixos.wiki/wiki/Printing
services.printing.enable = true;
services.printing.drivers = with pkgs; [ foo2zjs cups-filters ];
#services.printing.drivers = with pkgs; [ hplipWithPlugin cups-filters ];
#hardware.printers.ensureDefaultPrinter = lib.mkDefault "HP_LaserJet_P1005";
hardware.printers.ensurePrinters = lib.singleton {
name = "HP_LaserJet_P1005";
deviceUri = "usb://HP/LaserJet%20P1005?serial=BC0CAEQ"; # `lpstat -s`
model = "HP-LaserJet_P1005.ppd.gz"; # `lpinfo -m`
#location = "";
description = "Laser printer";
ppdOptions.PageSize = "A4";
};
}