nixos/libvirtd: Do not add autostart network

This does make the out-of-the-box install perhaps a bit worse, since
networking may need to be manually configured. However, it makes it less
frustrating that upon every start of this service, a *removed* autostart
network will be re-added when removed by the user. See
https://github.com/NixOS/nixpkgs/issues/73418 for details.

Behavior from other distros:

- Adds autostart net on install: Fedora
- Does not add autostart net   : Debian, Arch

This does not break any existing installs since it does not affect any
autostart network already in-place.
This commit is contained in:
Andrew Marshall 2022-08-12 19:16:14 -04:00 committed by Franz Pletz
parent ad40478324
commit 6dc1c73aba

View File

@ -293,7 +293,7 @@ in
# Copy default libvirt network config .xml files to /var/lib
# Files modified by the user will not be overwritten
for i in $(cd ${cfg.package}/var/lib && echo \
libvirt/qemu/networks/*.xml libvirt/qemu/networks/autostart/*.xml \
libvirt/qemu/networks/*.xml \
libvirt/nwfilter/*.xml );
do
mkdir -p /var/lib/$(dirname $i) -m 755