2024-08-01 21:42:59 +02:00
|
|
|
{ lib, pkgs, config, ...}: let
|
|
|
|
inherit (lib) mkIf mkEnableOption mkOption;
|
|
|
|
cfg = config.chuj.stuff.printing;
|
|
|
|
in {
|
|
|
|
options.chuj.stuff.printing = {
|
|
|
|
enable = mkEnableOption "printing";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.printing = {
|
|
|
|
enable = true;
|
|
|
|
drivers = [ pkgs.brlaser ];
|
|
|
|
};
|
|
|
|
hardware.printers = {
|
|
|
|
ensurePrinters = [
|
|
|
|
{
|
|
|
|
name = "brother-dcp-1622we";
|
2024-09-16 22:37:48 +02:00
|
|
|
deviceUri = "usb://Brother/DCP-1610W%20series?serial=E76029D2N155302";
|
2024-08-01 21:42:59 +02:00
|
|
|
model = "drv:///brlaser.drv/br1600.ppd";
|
|
|
|
ppdOptions = {
|
|
|
|
PageSize = "A4";
|
2024-09-16 22:37:48 +02:00
|
|
|
Resolution = "1200dpi";
|
2024-08-01 21:42:59 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
ensureDefaultPrinter = "brother-dcp-1622we";
|
|
|
|
};
|
|
|
|
};
|
2024-09-16 22:37:48 +02:00
|
|
|
}
|