2024-07-11 15:06:41 +02:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
with lib.metacfg;
|
|
|
|
let cfg = config.metacfg.homeprinter;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.metacfg.homeprinter = with types; {
|
|
|
|
enable = mkBoolOpt false "Whether or not to enable the home printers.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.printing.drivers = with pkgs; [
|
|
|
|
metacfg.dcpl2530dw-cups
|
|
|
|
gutenprintBin
|
|
|
|
gutenprint
|
|
|
|
];
|
|
|
|
|
2024-10-16 14:43:21 +02:00
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
nssmdns6 = true;
|
|
|
|
ipv6 = true;
|
|
|
|
ipv4 = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedUDPPorts = [ 5353 ];
|
|
|
|
|
2024-07-11 15:06:41 +02:00
|
|
|
hardware.printers.ensurePrinters = [
|
|
|
|
{
|
|
|
|
name = "Brother_DCP-L2530DW_series";
|
|
|
|
location = "Dach";
|
|
|
|
deviceUri = "dnssd://Brother%20DCP-L2530DW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-cc6b1e5cd0ea";
|
|
|
|
model = "brother-DCPL2530DW-cups-en.ppd";
|
|
|
|
ppdOptions = {
|
|
|
|
PageSize = "A4";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Canon_MG6300_series";
|
|
|
|
location = "Dach";
|
|
|
|
deviceUri = "dnssd://Canon%20MG6300%20series._ipp._tcp.local/?uuid=00000000-0000-1000-8000-2C9EFC9C7BA5";
|
|
|
|
model = "gutenprint.5.3://bjc-PIXMA-MG6350/expert";
|
|
|
|
ppdOptions = {
|
2024-07-11 16:33:55 +02:00
|
|
|
PageSize = "w283h425";
|
|
|
|
# StpFullBleed = "True";
|
|
|
|
MediaType = "PhotoPlusGloss2";
|
|
|
|
ColorModel = "CMYK";
|
|
|
|
StpColorCorrection = "Accurate";
|
|
|
|
StpColorPrecision = "Best";
|
|
|
|
StpInkType = "CMYKk";
|
|
|
|
StpImageType = "Photo";
|
|
|
|
StpDitherAlgorithm = "Adaptive";
|
2024-07-11 15:06:41 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|