nixos/locate: cleanup optional parenthesis

This commit is contained in:
Sandro Jäckel 2023-10-03 00:19:57 +02:00
parent f98a338eec
commit b53f817088
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -6,7 +6,7 @@ let
cfg = config.services.locate;
isMLocate = hasPrefix "mlocate" cfg.locate.name;
isPLocate = hasPrefix "plocate" cfg.locate.name;
isMorPLocate = (isMLocate || isPLocate);
isMorPLocate = isMLocate || isPLocate;
isFindutils = hasPrefix "findutils" cfg.locate.name;
in
{
@ -216,18 +216,18 @@ in
setgid = true;
setuid = false;
};
mlocate = (mkIf isMLocate {
mlocate = mkIf isMLocate {
group = "mlocate";
source = "${cfg.locate}/bin/locate";
});
plocate = (mkIf isPLocate {
};
plocate = mkIf isPLocate {
group = "plocate";
source = "${cfg.locate}/bin/plocate";
});
};
in
mkIf isMorPLocate {
locate = mkMerge [ common mlocate plocate ];
plocate = (mkIf isPLocate (mkMerge [ common plocate ]));
plocate = mkIf isPLocate (mkMerge [ common plocate ]);
};
environment.systemPackages = [ cfg.locate ];