Files
config/hardware/printer/hp-laserjet-p1005.nix
T
2025-11-26 03:13:47 +01:00

27 lines
1.0 KiB
Nix

{ lib, pkgs, ... }:
{
# imports = [ ./share.nix ]; # up to the host to opt-in to
# https://wiki.nixos.org/wiki/Printing
services.printing.enable = lib.mkDefault true;
#services.printing.drivers = with pkgs; [ foo2zjs foomatic-filters cups-filters ];
#services.printing.drivers = with pkgs; [ foo2zjs hplip foomatic-filters cups-filters ];
services.printing.drivers = with pkgs; [ foo2zjs hplipWithPlugin foomatic-filters cups-filters ];
#services.printing.drivers = with pkgs; [ hplipWithPlugin cups-filters ];
hardware.printers = {
ensureDefaultPrinter = lib.mkDefault "HP_LaserJet_P1005";
ensurePrinters = lib.singleton {
name = "HP_LaserJet_P1005";
deviceUri = "hp:/usb/HP_LaserJet_P1005?serial=BC0CAEQ"; # `lpstat -s` # hplip
# deviceUri = "usb://HP/LaserJet%20P1005?serial=BC0CAEQ"; # `lpstat -s` # foo2zjs
model = "HP-LaserJet_P1005.ppd.gz"; # `lpinfo -m` # foo2zjs
#location = "";
description = "Laser printer";
ppdOptions.PageSize = "A4";
};
};
services.printing.logLevel = "debug";
}