You can do that much easier. All you have to do is to train the AppVM that serves as a template for your sys-net. So let’s say your disposable sys-net is based on fedora-34-dvm which in turn is based on fedora-34.
- shutdown all qubes
- change
virt_modeof fedora-dvm tohvmtemporarily - make sure the
provides_networkof fedora-dvm istrue - add the WiFi PCI device to fedora-dvm
- run fedora-dvm with
qvm-start fedora-dvm - once it started you’ll see the network manager icon in the tray; now train it the passwords you like it to know by connecting to those networks (e.g. home and phone hotspot)
- shutdown fedora-dvm
- remove the PCI device and undo the
provides_networkandvirt_modechanges
Next time you start your sys-net, it will know the passwords for those networks because they are now stored in the AppVM/disposable template that is the template for it.