{ lib, config, pkgs, ... }: let cfg = config.myConfig.cups; in { options.myConfig.cups = { enable = lib.mkEnableOption "printing"; }; config = { # Enable CUPS to print documents. services.printing = { enable = true; drivers = [pkgs.samsung-unified-linux-driver]; }; services.avahi = { enable = true; nssmdns = true; openFirewall = true; }; hardware.printers = { ensurePrinters = [ { name = "Samsung_ML-1630W_Series"; location = "luhbots"; deviceUri = "dnssd://Samsung%20ML-1630W%20Series%20(SEC00159937E684)._pdl-datastream._tcp.local/"; model = "samsung/ML-1630W.ppd"; ppdOptions = { PageSize = "A4"; }; } { name = "Brother_HL-L3210CW_series"; location = "Max Zimmer"; deviceUri = "dnssd://Brother%20HL-L3210CW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-900f0c617136"; model = "drv:///sample.drv/generic.ppd"; ppdOptions = { PageSize = "A4"; }; } ]; }; }; }