Configurable apt

This is #14 rebased on top of the latest master.