diff options
author | Matt McHenry <github@matt.mchenryfamily.org> | 2016-12-13 21:23:16 -0500 |
---|---|---|
committer | Matt McHenry <github@matt.mchenryfamily.org> | 2016-12-13 21:35:56 -0500 |
commit | 05fb82732c97582ecf0a35ed81111ab5d1c088d4 (patch) | |
tree | af90749462189bed41c6932649608e1a2eb0c8b3 /nixos | |
parent | 1c50bdd928cec055d2ca842e2cf567aba2584efc (diff) | |
download | nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.tar nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.tar.gz nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.tar.bz2 nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.tar.lz nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.tar.xz nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.tar.zst nixpkgs-05fb82732c97582ecf0a35ed81111ab5d1c088d4.zip |
use symlink to ensure cupsd.conf PATH always points to a valid store path
even if cups rewrites its config file due to config changes made through its web-based management UI, we need to keep the PATH pointing to currently-live nix store directories. fixes #20806.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/printing/cupsd.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index 368d7ac761a..3041dccfd15 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -75,7 +75,7 @@ let '') cfg.listenAddresses} Listen /var/run/cups/cups.sock - SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin + SetEnv PATH /var/lib/cups/path/lib/cups/filter:/var/lib/cups/path/bin DefaultShared ${if cfg.defaultShared then "Yes" else "No"} @@ -310,6 +310,13 @@ in for i in *; do [ ! -e "/var/lib/cups/$i" ] && ln -s "${rootdir}/etc/cups/$i" "/var/lib/cups/$i" done + + #update path reference + [ -L /var/lib/cups/path ] && \ + rm /var/lib/cups/path + [ ! -e /var/lib/cups/path ] && \ + ln -s ${bindir} /var/lib/cups/path + ${optionalString cfg.gutenprint '' if [ -d /var/lib/cups/ppd ]; then ${gutenprint}/bin/cups-genppdupdate -p /var/lib/cups/ppd |