add: printers, fix: fullbleed printing

This commit is contained in:
2026-01-19 09:31:48 -05:00
parent 00a486c5e6
commit 33abdb0cfc
4 changed files with 282 additions and 6 deletions

View File

@@ -0,0 +1,215 @@
*PPD-Adobe: "4.3"
*% PPD created by ipp2ppd (v2:Jun 6 2020)
*FormatVersion: "4.3"
*FileVersion: "2.0"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*FileSystem: False
*cupsVersion: 2.0
*cupsModelNumber: 0
*cupsSNMPSupplies: False
*APAirPrint: True
*APAirPrintVersion: 1.3
*APURFVersion: 1.3
*% WARNING missing printer-firmware-name and/or printer-firmware-string-version.
*cupsLanguages: "en"
*cupsIdentifyActions: "flash"
*APAcceptsMixedURF: True
*PCFileName: "APCANONI.PPD"
*ModelName: "Canon PIXMA iX6820"
*Product: (Canon PIXMA iX6820)
*ShortNickName: "Canon PIXMA iX6820"
*Manufacturer: "Canon"
*NickName: "Canon PIXMA iX6820-AirPrint"
*Throughput: 12
*APSupplies: "http://954290000000.local/index.html?PAGE_AAP"
*cupsSingleFile: True
*cupsFilter2: "image/jpeg image/jpeg 0 maxsize(12582912) -"
*cupsFilter: "image/jpeg 0 -"
*cupsFilter2: "image/urf image/urf 10 -"
*cupsFilter: "image/urf 10 -"
*cupsMaxCopies: 99
*ColorDevice: True
*APColorSpaces: true
*DefaultColorSpace: RGB
*OpenUI *ColorModel/Color Mode: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*DefaultColorModel: RGB
*ColorModel Gray/Grayscale: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel RGB/Color: "<</cupsColorSpace 19/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*CloseUI: *ColorModel
*LandscapeOrientation: Minus90
*DefaultResolution: 600x600dpi
*OpenUI *cupsPrintQuality/Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Normal: "<</cupsInteger1 4 /HWResolution[600 600]>>setpagedevice"
*cupsPrintQuality High: "<</cupsInteger1 5 /HWResolution[600 600]>>setpagedevice"
*CloseUI: *cupsPrintQuality
*cupsBackSide: Normal
*DefaultOutputOrder: Reverse
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: Letter.Fullbleed
*PageSize 3.5x5: "<</PageSize[252.0000 360.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 3.5x5.Fullbleed: "<</PageSize[252.0000 360.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 4x6: "<</PageSize[288.0000 432.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 4x6.Fullbleed: "<</PageSize[288.0000 432.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 5x7: "<</PageSize[360.0000 504.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 5x7.Fullbleed: "<</PageSize[360.0000 504.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 8x10: "<</PageSize[576.0000 720.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 8x10.Fullbleed: "<</PageSize[576.0000 720.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize A3: "<</PageSize[841.8898 1190.5512]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize A3.Fullbleed: "<</PageSize[841.8898 1190.5512]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize A4: "<</PageSize[595.2756 841.8898]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize A4.Fullbleed: "<</PageSize[595.2756 841.8898]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize A5: "<</PageSize[419.5276 595.2756]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize B4: "<</PageSize[728.5039 1031.8110]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize B5: "<</PageSize[515.9055 728.5039]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Env10: "<</PageSize[296.9858 684.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize EnvDL: "<</PageSize[311.8110 623.6220]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Legal: "<</PageSize[612.0000 1008.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Letter: "<</PageSize[612.0000 792.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Letter.Fullbleed: "<</PageSize[612.0000 792.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Postcard: "<</PageSize[283.4646 419.5276]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Postcard.Fullbleed: "<</PageSize[283.4646 419.5276]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Tabloid: "<</PageSize[792.0000 1224.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize Tabloid.Fullbleed: "<</PageSize[792.0000 1224.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 13x19: "<</PageSize[936.0000 1368.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageSize 13x19.Fullbleed: "<</PageSize[936.0000 1368.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: Letter.Fullbleed
*PageRegion 3.5x5: "<</PageSize[252.0000 360.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 3.5x5.Fullbleed: "<</PageSize[252.0000 360.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 4x6: "<</PageSize[288.0000 432.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 4x6.Fullbleed: "<</PageSize[288.0000 432.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 5x7: "<</PageSize[360.0000 504.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 5x7.Fullbleed: "<</PageSize[360.0000 504.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 8x10: "<</PageSize[576.0000 720.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 8x10.Fullbleed: "<</PageSize[576.0000 720.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion A3: "<</PageSize[841.8898 1190.5512]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion A3.Fullbleed: "<</PageSize[841.8898 1190.5512]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion A4: "<</PageSize[595.2756 841.8898]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion A4.Fullbleed: "<</PageSize[595.2756 841.8898]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion A5: "<</PageSize[419.5276 595.2756]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion B4: "<</PageSize[728.5039 1031.8110]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion B5: "<</PageSize[515.9055 728.5039]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Env10: "<</PageSize[296.9858 684.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion EnvDL: "<</PageSize[311.8110 623.6220]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Legal: "<</PageSize[612.0000 1008.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Letter: "<</PageSize[612.0000 792.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Letter.Fullbleed: "<</PageSize[612.0000 792.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Postcard: "<</PageSize[283.4646 419.5276]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Postcard.Fullbleed: "<</PageSize[283.4646 419.5276]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Tabloid: "<</PageSize[792.0000 1224.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion Tabloid.Fullbleed: "<</PageSize[792.0000 1224.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 13x19: "<</PageSize[936.0000 1368.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*PageRegion 13x19.Fullbleed: "<</PageSize[936.0000 1368.0000]/ImagingBBox null/Orientation 0>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: Letter.Fullbleed
*DefaultPaperDimension: Letter.Fullbleed
*PaperDimension 3.5x5: "252.0000 360.0000"
*ImageableArea 3.5x5: "9.6378 14.1732 242.3622 345.8268"
*PaperDimension 3.5x5.Fullbleed: "252.0000 360.0000"
*ImageableArea 3.5x5.Fullbleed: "0.0000 0.0000 252.0000 360.0000"
*PaperDimension 4x6: "288.0000 432.0000"
*ImageableArea 4x6: "9.6378 14.1732 278.3622 417.8268"
*PaperDimension 4x6.Fullbleed: "288.0000 432.0000"
*ImageableArea 4x6.Fullbleed: "0.0000 0.0000 288.0000 432.0000"
*PaperDimension 5x7: "360.0000 504.0000"
*ImageableArea 5x7: "9.6378 14.1732 350.3622 489.8268"
*PaperDimension 5x7.Fullbleed: "360.0000 504.0000"
*ImageableArea 5x7.Fullbleed: "0.0000 0.0000 360.0000 504.0000"
*PaperDimension 8x10: "576.0000 720.0000"
*ImageableArea 8x10: "9.6378 14.1732 566.3622 705.8268"
*PaperDimension 8x10.Fullbleed: "576.0000 720.0000"
*ImageableArea 8x10.Fullbleed: "0.0000 0.0000 576.0000 720.0000"
*PaperDimension A3: "841.8898 1190.5512"
*ImageableArea A3: "9.6378 14.1732 832.2520 1176.3780"
*PaperDimension A3.Fullbleed: "841.8898 1190.5512"
*ImageableArea A3.Fullbleed: "0.0000 0.0000 841.8898 1190.5512"
*PaperDimension A4: "595.2756 841.8898"
*ImageableArea A4: "9.6378 14.1732 585.6378 827.7165"
*PaperDimension A4.Fullbleed: "595.2756 841.8898"
*ImageableArea A4.Fullbleed: "0.0000 0.0000 595.2756 841.8898"
*PaperDimension A5: "419.5276 595.2756"
*ImageableArea A5: "9.6378 14.1732 409.8898 581.1024"
*PaperDimension B4: "728.5039 1031.8110"
*ImageableArea B4: "9.6378 14.1732 718.8661 1017.6378"
*PaperDimension B5: "515.9055 728.5039"
*ImageableArea B5: "9.6378 14.1732 506.2677 714.3307"
*PaperDimension Env10: "296.9858 684.0000"
*ImageableArea Env10: "15.8740 106.0157 281.1118 661.3228"
*PaperDimension EnvDL: "311.8110 623.6220"
*ImageableArea EnvDL: "15.8740 106.0157 295.9370 600.9449"
*PaperDimension Legal: "612.0000 1008.0000"
*ImageableArea Legal: "18.1417 14.1732 593.8583 993.8268"
*PaperDimension Letter: "612.0000 792.0000"
*ImageableArea Letter: "18.1417 14.1732 593.8583 777.8268"
*PaperDimension Letter.Fullbleed: "612.0000 792.0000"
*ImageableArea Letter.Fullbleed: "0.0000 0.0000 612.0000 792.0000"
*PaperDimension Postcard: "283.4646 419.5276"
*ImageableArea Postcard: "9.6378 14.1732 273.8268 405.3543"
*PaperDimension Postcard.Fullbleed: "283.4646 419.5276"
*ImageableArea Postcard.Fullbleed: "0.0000 0.0000 283.4646 419.5276"
*PaperDimension Tabloid: "792.0000 1224.0000"
*ImageableArea Tabloid: "9.6378 14.1732 782.3622 1209.8268"
*PaperDimension Tabloid.Fullbleed: "792.0000 1224.0000"
*ImageableArea Tabloid.Fullbleed: "0.0000 0.0000 792.0000 1224.0000"
*PaperDimension 13x19: "792.0000 1224.0000"
*ImageableArea 13x19: "9.6378 14.1732 926.3622 1353.8268"
*PaperDimension 13x19.Fullbleed: "936.0000 1368.0000"
*ImageableArea 13x19.Fullbleed: "0.0000 0.0000 936.0000 1368.0000"
*ParamCustomPageSize Width: 1 points 156 933
*ParamCustomPageSize Height: 2 points 258 1916
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 3
*CustomPageSize True: ""
*OpenUI *MediaType/MediaType: PickOne
*OrderDependency: 10 AnySetup *MediaType
*MediaType stationery/Stationery: ""
*MediaType photographic/Photo: ""
*MediaType envelope/Envelope: ""
*MediaType any/Any: ""
*DefaultMediaType: any
*CloseUI: *MediaType
*APPrinterPreset Gray_with_Paper_Auto-Detect/Black and White: "
*cupsPrintQuality Normal
*ColorModel Gray
com.apple.print.preset.graphicsType General
com.apple.print.preset.quality mid
com.apple.print.preset.media-front-coating autodetect
com.apple.print.preset.output-mode monochrome"
*End
*APPrinterPreset Color_with_Paper_Auto-Detect/Color: "
*cupsPrintQuality Normal
*ColorModel RGB
com.apple.print.preset.graphicsType General
com.apple.print.preset.quality mid
com.apple.print.preset.media-front-coating autodetect"
*End
*APPrinterPreset Photo_on_Plain_Paper/Photo on Plain Paper: "
*cupsPrintQuality High
*Duplex None
*ColorModel RGB
*MediaType stationery
com.apple.print.preset.graphicsType Photo
com.apple.print.preset.quality high
com.apple.print.preset.media-front-coating none
"
*End
*APPrinterPreset Photo_on_Photo_Paper/Photo on Photo Paper: "
*cupsPrintQuality High
*Duplex None
*ColorModel RGB
*MediaType photographic
com.apple.print.preset.graphicsType Photo
com.apple.print.preset.quality high
com.apple.print.preset.media-front-coating photo
"
*End

View File

@@ -0,0 +1,23 @@
# Printing Service Module
This module configures a Canon PIXMA iX6820 printer for fullbleed/borderless printing on NixOS.
## PPD File
The `Canon_PIXMA_iX6820_AirPrint.ppd` file is essential for enabling fullbleed (borderless) printing on the Canon PIXMA iX6820.
The default IPP/PPD driver included with Linux claims to support borderless printing, but it never works in practice. This custom PPD was generated via macOS and manually converted to work with Linux/CUPS to actually enable fullbleed printing functionality. It provides CUPS with the necessary printer capabilities and configuration options, including the `4x6.Fullbleed` page size and media type options.
## Nix Module
The module (`default.nix`) provides a NixOS service that:
- Enables CUPS printing service
- Installs the custom PPD driver for the Canon PIXMA iX6820
- Configures the printer via `hardware.printers.ensurePrinters`
- Sets default print options for high-quality borderless photo printing:
- Page size: 4x6 Fullbleed
- Color model: RGB
- Print quality: High
- Media type: Photographic
- Sets the printer as the default system printer

View File

@@ -1,24 +1,62 @@
{ config
, lib
, pkgs
, namespace
, ...
}:
let
inherit (lib) mkIf mkEnableOption types;
inherit (lib.${namespace}) mkOpt;
inherit (lib) mkIf mkEnableOption;
inherit (pkgs) writeTextDir;
cfg = config.${namespace}.services.printing;
in
{
options.${namespace}.services.printing = with types; {
options.${namespace}.services.printing = {
enable = mkEnableOption "enable printing service";
drivers = mkOpt (listOf package) [ ] "print drivers to use";
};
config = mkIf cfg.enable {
hardware.printers = {
ensurePrinters = [
{
name = "Canon_PIXMA_iX6820";
location = "Home";
deviceUri = "ipp://954290000000.local:631/ipp/print";
model = "Canon_PIXMA_iX6820.ppd";
ppdOptions = {
PageSize = "4x6.Fullbleed";
ColorModel = "RGB";
cupsPrintQuality = "High";
MediaType = "photographic";
};
}
{
name = "Brother_HL-2270DW";
location = "Home";
deviceUri = "dnssd://Brother%20HL-2270DW%20series._pdl-datastream._tcp.local/";
model = "drv:///brlaser.drv/br2270d.ppd";
ppdOptions = {
PageSize = "Letter";
Resolution = "600dpi";
InputSlot = "Auto";
MediaType = "PLAIN";
Duplex = "DuplexNoTumble";
brlaserEconomode = "False";
brlaserDensityAdjust = "100";
};
}
];
ensureDefaultPrinter = "Canon_PIXMA_iX6820";
};
services.printing = {
enable = true;
drivers = cfg.drivers;
drivers = [
pkgs.brlaser
(writeTextDir "share/cups/model/Canon_PIXMA_iX6820.ppd" (
builtins.readFile ./Canon_PIXMA_iX6820_AirPrint.ppd
))
];
};
};
}