[Nix-dev] lpadmin patch for cupsd module

roconnor at theorem.ca roconnor at theorem.ca
Thu Jun 14 14:14:03 CEST 2012


I propose the following patch to add an lpadmin group for cupsd 
adminitration.  This is more or less required for anyone running on a 
system without a root password.  I see no harm in enabling it by default.

Index: modules/services/printing/cupsd.nix
===================================================================
--- modules/services/printing/cupsd.nix (revision 34260)
+++ modules/services/printing/cupsd.nix (working copy)
@@ -108,6 +108,11 @@
          description = "CUPS printing services";
        };

+    users.extraGroups = singleton
+      { name = "lpadmin";
+        gid = config.ids.gids.lpadmin;
+      };
+
      environment.systemPackages = [ cups ];

      services.dbus.packages = [ cups ];
@@ -144,7 +149,7 @@
        ''
          LogLevel info

-        SystemGroup root
+        SystemGroup root lpadmin

          Listen localhost:631
          Listen /var/run/cups/cups.sock
Index: modules/misc/ids.nix
===================================================================
--- modules/misc/ids.nix        (revision 34260)
+++ modules/misc/ids.nix        (working copy)
@@ -118,6 +118,7 @@
      dovecot2 = 46;
      prayer = 49;
      mpd = 50;
+    lpadmin = 51;

      # When adding a gid, make sure it doesn't match an existing uid.

I'll let the cups authority vet the patch and commit it.

Thanks.

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''


More information about the nix-dev mailing list