Author: viric
Date: 2010-06-07 21:09:27 +0000 (Mon, 07 Jun 2010)
New Revision: 22173

You can view the changes in this commit at:
   https://svn.nixos.org/viewvc/nix?rev=22173&view=rev

Modified:
   nixos/trunk/modules/services/printing/cupsd.nix

Log:
Trying to improve the cups expression a bit, so it can print also with local 
usb printers.
(Thank you Oleksandr)



Changes:

Modified: nixos/trunk/modules/services/printing/cupsd.nix
===================================================================
--- nixos/trunk/modules/services/printing/cupsd.nix     2010-06-07 14:44:48 UTC 
(rev 22172)
+++ nixos/trunk/modules/services/printing/cupsd.nix     2010-06-07 21:09:27 UTC 
(rev 22173)
@@ -106,6 +106,11 @@
 
     services.dbus.packages = [cups];
 
+    # cups uses libusb to talk to printers, and does not use the
+    # linux kernel driver. If the driver is not in a black list, it
+    # gets loaded, and then cups cannot access the printers.
+    boot.blacklistedKernelModules = [ "usblp" ];
+
     environment.etc =
       [ # CUPS expects the following files in its ServerRoot.
         { source = "${cups}/etc/cups/mime.convs";
@@ -122,15 +127,17 @@
         startOn = "started network-interfaces";
         stopOn = "stopping network-interfaces";
 
+        environment = {
+          # Cups scripts for printing (psto...) require awk, sed, grep, ...
+          PATH = config.system.path;
+        };
+
         preStart =
           ''
             mkdir -m 0755 -p ${logDir}
             mkdir -m 0700 -p /var/cache/cups
             mkdir -m 0700 -p /var/spool/cups
             mkdir -m 0755 -p ${cfg.tempDir}
-
-            # Make USB printers show up.
-            ${modprobe}/sbin/modprobe usblp || true
           '';
 
         exec = "${cups}/sbin/cupsd -c ${pkgs.writeText "cupsd.conf" 
cfg.cupsdConf} -F";

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to