# roles/thin-client/peripherals/printing.nix # # CUPS with the single Pull-Print queue. Q16 decision: All users print # to one queue, retrieve at any physical device via badge/PIN. # # Driverless IPPS — no vendor driver needed. {config, lib, pkgs, ...}: let inherit (lib) mkIf mkOption types; cfg = config.az.tc; in { options.az.tc.printing = { pullPrintEndpoint = mkOption { type = types.str; default = "ipps://pull-print.az-group.local:443/ipp/print"; # TODO: real endpoint description = '' IPPS URI of the Pull-Print queue. All thin clients print here. ''; }; queueName = mkOption { type = types.str; default = "Pull-Print"; description = "Name of the local CUPS queue for the Pull-Print endpoint."; }; }; config = mkIf cfg.enable { services.printing = { enable = true; drivers = with pkgs; [cups-filters]; browsing = false; listenAddresses = ["localhost:631"]; allowFrom = ["localhost"]; }; # No Avahi — Q16 decision: "Avahi aus". services.avahi.enable = false; # Single Pull-Print queue hardware.printers = { ensurePrinters = [ { name = config.az.tc.printing.queueName; location = "Pull-Print"; description = "Central Pull-Print queue (follow-me print)"; deviceUri = config.az.tc.printing.pullPrintEndpoint; model = "everywhere"; ppdOptions = {PageSize = "A4";}; } ]; ensureDefaultPrinter = config.az.tc.printing.queueName; }; }; }