Refactor duplicated settings code into a decorator
Adds method to freeze apt sources list on ubuntu machines