So if you snap needs to or expects to execute commands from the host system (such as vim/emacs etc) or to manage non-root development workspace environments, then this is an identified use-case for classic requirement as per Process for reviewing classic confinement snaps
However in that case you would need to more clearly describe these use-cases specifically for devoperator so that it is clear that this is definitely required.
In regards to your snapcraft.yaml above, there are a couple redundant sections which can be removed - ie all of the following
home:
interface: home
devoperator-network:
interface: network
ansible-ssh:
interface: ssh-keys
As this can be replaced with just:
plugs:
- home
- network
- ssh-keys
where required.
Also if all commands need the same set of interfaces connected, then you can just specify a top-level plugs
to list them all (in the same manner as the top-level slots
) - then you don’t have to repeat it for each separate app
entry.
Finally, it would probably be more reliable to lookup HOME
as:
getent passwd $(id -u) | cut -d ':' -f 6