nix/modules/stuff/printing.nix
2024-10-16 11:40:24 +02:00

29 lines
734 B
Nix

{ 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";
deviceUri = "usb://Brother/DCP-1610W%20series?serial=E76029D2N155302";
model = "drv:///brlaser.drv/br1600.ppd";
ppdOptions = {
PageSize = "A4";
Resolution = "1200dpi";
};
}
];
ensureDefaultPrinter = "brother-dcp-1622we";
};
};
}