I’m doing pretty much exactly that (except I only do the read bit), and it works for me:
plugs:
gitconfig:
interface: personal-files
read: [$HOME/.gitconfig]
apps:
git-icdiff:
command: usr/bin/git-icdiff
plugs:
- home # so it can acess files under the user's home
- removable-media # so it can access things in /media, etc
- gitconfig # so it can access ~/.gitconfig :-)
don’t know if the interface needs to do more sanity checking (cc @jdstrand) but “write” implies “read” so there would be no need to repeat the same path there (otoh as I said not sure it creates problems because of not enough sanity checking or not)
Okay, further investigation. I can confirm this IS working as expected. The software seems to try and gain access to .kube/, which is denied unless explicitly listed (which makes sense), first, so you need to add all the base dirs to this list if your software spans/walks to find this file.