juspay / services-flake

NixOS-like services for Nix flakes
https://community.flake.parts/services-flake
MIT License
342 stars 28 forks source link

Feature: allow setting the UDS directory on MySql service #171

Closed attilaersek closed 4 months ago

attilaersek commented 4 months ago

Unix domain sockets have a severe limitation that the path must be a maximum 108 characters. Currently the UDS is created in the relative data directory, which can be a lot longer, depending on the user's setup.

By default mysql uses the /tmp directory to create UDS.

Introducing a socketDir attribute would allow users to override the UDS location. The value of socketDir should default to dataDir to maintain backward compatibility.