From 8167dec3203cc5e9751b799f751fe56ea2d655b7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Oct 2024 09:13:11 +0100 Subject: ... --- accounts/gkleen@sif/libvirt/default.nix | 38 ++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'accounts/gkleen@sif/libvirt/default.nix') diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix index a93a2266..54d971c4 100644 --- a/accounts/gkleen@sif/libvirt/default.nix +++ b/accounts/gkleen@sif/libvirt/default.nix @@ -1,5 +1,6 @@ -{ flakeInputs, ... }: +{ flakeInputs, lib, ... }: +with lib; with flakeInputs.nixVirt.lib; { @@ -7,6 +8,41 @@ with flakeInputs.nixVirt.lib; virtualisation.libvirt = { enable = true; connections."qemu:///session" = { + domains = [ + { definition = domain.writeXML (recursiveUpdate (domain.templates.windows { + name = "lmmirzm-vmrz01"; + uuid = "9e1dab2e-7986-4cb3-88af-6fad8969e15f"; + memory = { count = 16; unit = "GiB"; }; + storage_vol = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; + nvram_path = "/home/gkleen/.local/share/libvirt/lmmirzm-vmrz01.nvram"; + virtio_net = true; + virtio_drive = true; + virtio_video = false; + install_virtio = true; + }) { + vcpu.count = 4; + os.bootmenu.enable = true; + devices.graphics = { + listen.type = "address"; + # gl.enable = true; + }; + devices.interface = { + type = "bridge"; + mac.address = "52:54:00:b9:f3:ed"; + source.bridge = "gre-0971"; + }; + }); + } + ]; + pools = [ + { definition = ./pool-default.xml; + active = true; + volumes = [ + { definition = ./vol-lmmirzm-vmrz01.xml; + } + ]; + } + ]; }; }; }; -- cgit v1.2.3