All checks were successful
Check flake syntax / flake-check (push) Successful in 6m5s
123 lines
5.8 KiB
Nix
123 lines
5.8 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.services.malobeo.printing;
|
|
driverFile = pkgs.writeTextDir "share/cups/model/konicaminoltac258.ppd" (builtins.readFile ../KOC658UX.ppd);
|
|
|
|
defaultPpdOptions = {
|
|
PageSize = "A4";
|
|
SelectColor = "Grayscale";
|
|
Finisher = "FS534";
|
|
SaddleUnit = "SD511";
|
|
Model = "C258";
|
|
InputSlot = "Tray1";
|
|
TextPureBlack = "On";
|
|
PhotoPureBlack = "On";
|
|
GraphicPureBlack = "On";
|
|
};
|
|
|
|
in
|
|
{
|
|
options.services.malobeo.printing = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Setup malobeo printers";
|
|
};
|
|
};
|
|
|
|
config = mkIf (cfg.enable) {
|
|
services.printing.enable = true;
|
|
services.printing.drivers = [
|
|
driverFile
|
|
];
|
|
|
|
hardware.printers.ensurePrinters = [
|
|
{
|
|
name = "KonicaDefault";
|
|
model = "konicaminoltac258.ppd";
|
|
location = "Zine Workshop";
|
|
deviceUri = "ipp://192.168.1.42/ipp";
|
|
ppdOptions = defaultPpdOptions;
|
|
}
|
|
{
|
|
name = "KonicaBooklet";
|
|
model = "konicaminoltac258.ppd";
|
|
location = "Zine Workshop";
|
|
deviceUri = "ipp://192.168.1.42/ipp";
|
|
ppdOptions = defaultPpdOptions // {
|
|
Fold = "Stitch";
|
|
Staple = "None";
|
|
};
|
|
}
|
|
{
|
|
name = "KonicaPostcard";
|
|
model = "konicaminoltac258.ppd";
|
|
location = "Zine Workshop";
|
|
deviceUri = "ipp://192.168.1.42/ipp";
|
|
ppdOptions = defaultPpdOptions // {
|
|
Fold = "None";
|
|
Staple = "None";
|
|
InputSlot = "BypassTray";
|
|
MediaType = "Thick4";
|
|
KMDuplex = "1Sided";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|
|
|
|
/*
|
|
ALL AVAILABE OPTIONS:
|
|
|
|
PaperSources/Paper Source Unit: *None LU207 LU302 PC110 PC114 PC115 PC110+LU302 PC115+LU207 PC115+LU302 PC210 PC214 PC215 PC210+LU302 PC215+LU207 PC215+LU302 PC410 PC414 PC415 PC410+LU302 PC415+LU207 PC415+LU302
|
|
Finisher/Finisher: None FS533 *FS534 JS506 FS536 FS537 FS537+JS602
|
|
KOPunch/Punch Unit: *None PK519 PK519-3 PK519-4 PK519-SWE4 PK520 PK520-3 PK520-4 PK520-SWE4 PK523 PK523-3 PK523-4 PK523-SWE4
|
|
ZFoldPunch/Z-Fold Unit: *None ZU609
|
|
CoverSheetFeeder/Post Inserter: *None PI507
|
|
SaddleUnit/Saddle Kit: None *SD511 SD512
|
|
PrinterHDD/Hard Disk: None *HDD
|
|
AdvancedFunctionCover/Advanced Function(Cover Mode): *Disable Enable
|
|
Model/Model: C658 C558 C458 C368 C308 *C258 C287 C227 C266 C226
|
|
Collate/Collate: False *True
|
|
InputSlot/Paper Tray: AutoSelect *Tray1 Tray2 Tray3 Tray4 LCT ManualFeed
|
|
MediaType/Paper Type: *Plain Plain(2nd) Thick1 Thick1(2nd) Thick1Plus Thick1Plus(2nd) Thick2 Thick2(2nd) Thick3 Thick3(2nd) Thick4 Thick4(2nd) Thin Envelope Transparency Color SingleSidedOnly TAB Letterhead Special Recycled Recycled(2nd) User1 User1(2nd) User2 User2(2nd) User3 User3(2nd) User4 User4(2nd) User5 User5(2nd) User6 User6(2nd) PrinterDefault UserCustomType1 UserCustomType1(2nd) UserCustomType2 UserCustomType2(2nd) UserCustomType3 UserCustomType3(2nd) UserCustomType4 UserCustomType4(2nd) UserCustomType5 UserCustomType5(2nd) UserCustomType6 UserCustomType6(2nd) UserCustomType7 UserCustomType7(2nd) UserCustomType8 UserCustomType8(2nd) UserCustomType9 UserCustomType9(2nd) UserCustomType10 UserCustomType10(2nd) UserCustomType11 UserCustomType11(2nd) UserCustomType12 UserCustomType12(2nd) UserCustomType13 UserCustomType13(2nd) UserCustomType14 UserCustomType14(2nd) UserCustomType15 UserCustomType15(2nd) UserCustomType16 UserCustomType16(2nd) UserCustomType17 UserCustomType17(2nd) UserCustomType18 UserCustomType18(2nd) UserCustomType19 UserCustomType19(2nd)
|
|
PageSize/Paper Size: A3 *A4 A5 A6 B4 B5 B6 SRA3 220mmx330mm 12x18 Tabloid Legal Letter Statement 8x13 8.5x13 8.5x13.5 8.25x13 8.125x13.25 Executive 8K 16K EnvISOB5 EnvC4 EnvC5 EnvC6 EnvChou3 EnvChou4 EnvYou3 EnvYou4 EnvKaku1 EnvKaku2 EnvKaku3 EnvDL EnvMonarch Env10 JapanesePostCard 4x6_PostCard A3Extra A4Extra A5Extra B4Extra B5Extra TabloidExtra LetterExtra StatementExtra LetterTab-F A4Tab-F
|
|
Offset/Offset: *False True
|
|
OutputBin/Output Tray: *Default Tray1 Tray2 Tray3 Tray4
|
|
Binding/Binding Position: *LeftBinding TopBinding RightBinding
|
|
KMDuplex/Print Type: 1Sided *2Sided
|
|
Combination/Combination: *None Booklet
|
|
Staple/Staple: *None 1StapleAuto(Left) 1StapleZeroLeft 1Staple(Right) 2Staples
|
|
Punch/Punch: *None 2holes 3holes 4holes
|
|
Fold/Fold: None *Stitch HalfFold TriFold ZFold1 ZFold2
|
|
FrontCoverPage/Front Cover: None *Printed Blank
|
|
FrontCoverTray/Front Cover Tray: None Tray1 Tray2 Tray3 Tray4 LCT *BypassTray
|
|
BackCoverPage/Back Cover: *None Printed Blank
|
|
BackCoverTray/Back Cover Tray: *None Tray1 Tray2 Tray3 Tray4 LCT BypassTray
|
|
PIFrontCover/Front Cover from Post Inserter: *None PITray1 PITray2
|
|
PIBackCover/Back Cover from Post Inserter: *None PITray1 PITray2
|
|
TransparencyInterleave/Transparency Interleave: *None Blank
|
|
OHPOpTray/Interleave Tray: *None Tray1 Tray2 Tray3 Tray4 LCT
|
|
WaitMode/Output Method: *None ProofMode
|
|
SelectColor/Select Color: Auto Color *Grayscale
|
|
GlossyMode/Glossy Mode: *False True
|
|
OriginalImageType/Color Settings: *Document Photo DTP Web CAD
|
|
AutoTrapping/Auto Trapping: *False True
|
|
BlackOverPrint/Black Over Print: *Off Text TextGraphic
|
|
TextColorMatching/Color Matching (Text): *Auto Vivid Photo Colorimetric
|
|
TextPureBlack/Pure Black (Text): *Auto Off On
|
|
TextScreen/Screen (Text): *Auto Gradation Resolution HighResolution
|
|
PhotoColorMatching/Color Matching (Photo): *Auto Vivid Photo Colorimetric
|
|
PhotoPureBlack/Pure Black (Photo): *Auto Off On
|
|
PhotoScreen/Screen (Photo): *Auto Gradation Resolution HighResolution
|
|
PhotoSmoothing/Smoothing (Photo): *Auto None Dark Medium Light
|
|
GraphicColorMatching/Color Matching (Graphic): *Auto Vivid Photo Colorimetric
|
|
GraphicPureBlack/Pure Black (Graphic): *Auto Off On
|
|
GraphicScreen/Screen (Graphic): *Auto Gradation Resolution HighResolution
|
|
GraphicSmoothing/Smoothing (Graphic): *Auto None Dark Medium Light
|
|
TonerSave/Toner Save: *False True
|
|
String4Pt/Edge Enhancement: *False True
|
|
|
|
*/
|