Experimental flag for hiding ~/snap

My reading is that the move from ~/snap to ~/.snap would happen for all snaps on the system. It’s the environment changes that would be limited to core22+ snaps.

That makes sense, since the environment changes are very likely to break existing snaps. For example, imagine I have a program that writes its configuration to $HOME/.foorc and I’ve created a core20 based snap out of it. With the current environment, it will write that config to $SNAP_USER_DATA/.foorc. If we leave $HOME unchanged for snaps, the program will start getting AppArmor errors when trying to access its config file.

There’s no core22 snaps in existence right now, so making the environment change contingent on the base snap won’t break any existing published snaps.