The easy parts of config-user.sh have been rewritten to python. I tried to avoid using subprocess wherever possible. Some parts remain open (see TODOs), but it should mostly work. Probably