This has only been tested on macOS Sierra, 10.12. YMMV, caveat emptor, yadda-yadda...
You need to install Karabiner-Elements from this fork: https://github.com/wwwjfy/Karabiner-Elements, then the following will set up the default function keys and the capslock functionality (via this issue).
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false