nix/modules/stuff/printing.nix

30 lines
736 B
Nix
Raw Normal View History

{ 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";
model = "drv:///brlaser.drv/br1600.ppd";
ppdOptions = {
PageSize = "A4";
2024-09-16 22:37:48 +02:00
Resolution = "1200dpi";
};
}
];
ensureDefaultPrinter = "brother-dcp-1622we";
};
};
2024-09-16 22:37:48 +02:00
}