diff options
author | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2022-07-19 19:42:28 +0200 |
---|---|---|
committer | Yarny0 <41838844+Yarny0@users.noreply.github.com> | 2022-12-09 22:20:09 +0100 |
commit | 49a129ab4027ceeee3d4f67898ff6ee8067daeac (patch) | |
tree | 940b404c7c1172dfe67877e7da6c4fbbbee3f107 /nixos/modules/module-list.nix | |
parent | 56bc902b236bac6db8211ac8c48e441a82d84feb (diff) |
nixos/cups-pdf: init
Some implementation notes: * cups-pdf, and cups-pdf-to-pdf, support multiple instances with differing configurations. This can be accomplished by creating multiple configuration files with names `cups-pdf-{instance-name}.conf`. The Nixos module supports this feature by providing the option `instances` which is an attrset mapping instance names to instance configurations. To simplify module usage, an instance `pdf` is created by default. * To use a cups-pdf instance, one also needs a cups queue that connects to the backend. The module does this automatically by default, using the `hardware.printers.ensurePrinters`. It uses one of the ppd files which is included in the cups-pdf package. If this isn't desired (e.g. because printer queues should be created by hand, or configured differently), the `installPrinter` option can be turned off (for each instance separately). * In our configuration, cups calls external programs using the `cups` account and the `lp` group. cups-pdf refuses to operate without root privileges, likely because it needs to change the ownership of it output pdf files so that (only) the print job's owner can access them. The module installs a suid root wrapper for the backend program that can only be called by the `lp` group. The cups-pdf package is replaced by a wrapper package which calls the suid root wrapper. So cups can call its backend programs as usual.
Diffstat (limited to 'nixos/modules/module-list.nix')
-rw-r--r-- | nixos/modules/module-list.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 24dd30e157501..56f3b98556b79 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1018,6 +1018,7 @@ ./services/networking/znc/default.nix ./services/printing/cupsd.nix ./services/printing/ipp-usb.nix + ./services/printing/cups-pdf.nix ./services/scheduling/atd.nix ./services/scheduling/cron.nix ./services/scheduling/fcron.nix |