Pick over dried beans and soak them in water overnight.
The next day, drain off the soaking water, and place beans in a large pot or slow cooker. Cover with water and stir in dried onion and garlic. Season with salt, sugar, celery seed, cumin, cayenne pepper, red pepper flakes, and bay leaf. Add in ham hock and push down into beans. Bring to a boil, reduce the heat, and simmer over low heat for 3 to 4 hours.
Stir in smoked sausage, simmer for 20 more minutes, and serve.