mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
chore(shoryu): drop the libvirt default-network oneshot
NixOS's libvirtd-config copies default.xml but never creates its autostart link, and shoryu has no networks/autostart directory at all, so virbr0 never starts and the oneshot had nothing to disable. Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
1 parent
f520c992d5
commit
5c9bb6f95f
1 file changed
-16
@@ -39,22 +39,6 @@ in
|
||||
# The VMs attach to our existing bridge (br0), so allow it explicitly.
|
||||
virtualisation.libvirtd.allowedBridges = [ "br0" ];
|
||||
|
||||
# We don't want libvirt's NAT network (virbr0): every VM uses br0.
|
||||
systemd.services.libvirt-disable-default-net = {
|
||||
description = "Disable libvirt's default NAT network";
|
||||
after = [ "libvirtd.service" ];
|
||||
requires = [ "libvirtd.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
${pkgs.libvirt}/bin/virsh net-destroy default || true
|
||||
${pkgs.libvirt}/bin/virsh net-autostart --disable default || true
|
||||
'';
|
||||
};
|
||||
|
||||
# Define (and autostart) the declarative domains on every activation.
|
||||
systemd.services.libvirt-define-domains = {
|
||||
description = "Define the declarative libvirt domains";
|
||||
|
||||
Reference in new issue
Block a user