nixos/printing: fix CUPS SetEnv directive placement

With CUPS v2.3b5, the configuration directive `SetEnv`
moved from `cupsd.conf` to `cups-files.conf`.  See also
d47f6aec43 .

We have to follow up as `SetEnv` is now ignored in `cupsd.conf`.
Without this, executables called by cups
can't find other executables they depend on,
like `gs` or `perl`.
This commit is contained in:
Yarny0 2019-04-05 07:32:26 +02:00
parent d956f2279b
commit 631c71da83

View file

@ -60,6 +60,8 @@ let
TempDir ${cfg.tempDir}
SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin
# User and group used to run external programs, including
# those that actually send the job to the printer. Note that
# Udev sets the group of printer devices to `lp', so we want
@ -76,8 +78,6 @@ let
'') cfg.listenAddresses}
Listen /var/run/cups/cups.sock
SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin
DefaultShared ${if cfg.defaultShared then "Yes" else "No"}
Browsing ${if cfg.browsing then "Yes" else "No"}