linux plugin keyfile path may not work on some distros
Description
On linux we currently store the root owned plugin keyfile in /etc/electrum/plugins_key, however the /etc directory may not work on some distributions like NixOS and Fedora Silverblue as there the /etc directory is read only or its content can get deleted on system rebuilds/updates.
Is there a reason why we can't just store the keyfile in config.electrum_path() or alternatively at $HOME/.config/electrum/?
on some distributions like NixOS and Fedora Silverblue as there the /etc directory is read only
Oh right, immutable distros.
just store the keyfile in
config.electrum_path()or alternatively at$HOME/.config/electrum/?
The file should only be writable by root, but I guess that does not put a restriction on its location. Re putting it in the datadir, the question is whether we want it to be global:
- should it be reused between different instances of electrum run with custom
--dir? - should it be reused between mainnet/testnet?
Depending on the answer, one of your suggested locations makes sense.
I think it makes sense to make it global. Note that even testnet is relatively high value / sensitive: installed plugins get to execute code after all.