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