nix/modules/stuff/printing.nix

28 lines
No EOL
750 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 = "dnssd://Brother%20DCP-1610W%20series._pdl-datastream._tcp.local/?uuid=e3248000-80ce-11db-8000-c894023b7db8";
model = "drv:///brlaser.drv/br1600.ppd";
ppdOptions = {
PageSize = "A4";
};
}
];
ensureDefaultPrinter = "brother-dcp-1622we";
};
};
}