about summary refs log tree commit diff
path: root/nixos/modules/misc/locate.nix
diff options
context:
space:
mode:
authorParnell Springmeyer <parnell@digitalmentat.com>2017-01-29 11:27:08 -0600
committerParnell Springmeyer <parnell@digitalmentat.com>2017-01-29 11:27:08 -0600
commit9abe7528e4c495c868fa518af50c3cdfd1e755ed (patch)
tree555647b2b6e320b0f623212e59d3a04f0efbd257 /nixos/modules/misc/locate.nix
parent6777e6f812913f0213b71392bf2499a3e49b8dee (diff)
Switching locate over to new wrapper API
Diffstat (limited to 'nixos/modules/misc/locate.nix')
-rw-r--r--nixos/modules/misc/locate.nix19
1 files changed, 10 insertions, 9 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index a9c84f6db2431..089f354f61191 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -103,15 +103,16 @@ in {
   config = mkIf cfg.enable {
     users.extraGroups = mkIf isMLocate { mlocate = {}; };
 
-    security.setuidOwners = mkIf isMLocate
-      [ { group = "mlocate";
-          owner = "root";
-          permissions = "u+rx,g+x,o+x";
-          setgid = true;
-          setuid = false;
-          program = "locate";
-        }
-      ];
+    security.wrappers = mkIf isMLocate {
+      mlocate = {
+        group = "mlocate";
+        owner = "root";
+        permissions = "u+rx,g+x,o+x";
+        setgid = true;
+        setuid = false;
+        program = "locate";
+      };
+    };
 
     nixpkgs.config = { locate.dbfile = cfg.output; };