diff options
Diffstat (limited to 'accounts/gkleen@sif')
| -rw-r--r-- | accounts/gkleen@sif/libvirt/default.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix index fb2da5fc..bd398e88 100644 --- a/accounts/gkleen@sif/libvirt/default.nix +++ b/accounts/gkleen@sif/libvirt/default.nix | |||
| @@ -3,7 +3,13 @@ | |||
| 3 | with lib; | 3 | with lib; |
| 4 | with flakeInputs.nixVirt.lib; | 4 | with flakeInputs.nixVirt.lib; |
| 5 | 5 | ||
| 6 | { | 6 | let |
| 7 | libosinfo = id: with xml; | ||
| 8 | elem "libosinfo:libosinfo" [ (attr "xmlns:libosinfo" "http://libosinfo.org/xmlns/libvirt/domain/1.0") ] | ||
| 9 | [ | ||
| 10 | (elem "libosinfo:os" [ (attr "id" id) ] []) | ||
| 11 | ]; | ||
| 12 | in { | ||
| 7 | config = { | 13 | config = { |
| 8 | virtualisation.libvirt = { | 14 | virtualisation.libvirt = { |
| 9 | enable = true; | 15 | enable = true; |
| @@ -20,6 +26,7 @@ with flakeInputs.nixVirt.lib; | |||
| 20 | virtio_video = true; | 26 | virtio_video = true; |
| 21 | install_virtio = false; | 27 | install_virtio = false; |
| 22 | }) { | 28 | }) { |
| 29 | metadata = libosinfo "http://microsoft.com/win/11"; | ||
| 23 | qemu-commandline.env = [ | 30 | qemu-commandline.env = [ |
| 24 | { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } | 31 | { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } |
| 25 | ]; | 32 | ]; |
| @@ -73,6 +80,7 @@ with flakeInputs.nixVirt.lib; | |||
| 73 | { | 80 | { |
| 74 | readonly = true; | 81 | readonly = true; |
| 75 | type = "pflash"; | 82 | type = "pflash"; |
| 83 | secure = false; | ||
| 76 | path = "${pkgs.OVMFFull.fd}/FV/OVMF_CODE.ms.fd"; | 84 | path = "${pkgs.OVMFFull.fd}/FV/OVMF_CODE.ms.fd"; |
| 77 | }; | 85 | }; |
| 78 | nvram = | 86 | nvram = |
| @@ -82,6 +90,7 @@ with flakeInputs.nixVirt.lib; | |||
| 82 | }; | 90 | }; |
| 83 | bootmenu.enable = true; | 91 | bootmenu.enable = true; |
| 84 | }; | 92 | }; |
| 93 | metadata = libosinfo "http://ubuntu.com/ubuntu/20.04"; | ||
| 85 | qemu-commandline.env = [ | 94 | qemu-commandline.env = [ |
| 86 | { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } | 95 | { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } |
| 87 | ]; | 96 | ]; |
| @@ -148,6 +157,7 @@ with flakeInputs.nixVirt.lib; | |||
| 148 | { | 157 | { |
| 149 | readonly = true; | 158 | readonly = true; |
| 150 | type = "pflash"; | 159 | type = "pflash"; |
| 160 | secure = false; | ||
| 151 | path = "${pkgs.OVMFFull.fd}/FV/OVMF_CODE.ms.fd"; | 161 | path = "${pkgs.OVMFFull.fd}/FV/OVMF_CODE.ms.fd"; |
| 152 | }; | 162 | }; |
| 153 | nvram = | 163 | nvram = |
| @@ -157,6 +167,7 @@ with flakeInputs.nixVirt.lib; | |||
| 157 | }; | 167 | }; |
| 158 | bootmenu.enable = true; | 168 | bootmenu.enable = true; |
| 159 | }; | 169 | }; |
| 170 | metadata = libosinfo "http://ubuntu.com/ubuntu/24.04"; | ||
| 160 | qemu-commandline.env = [ | 171 | qemu-commandline.env = [ |
| 161 | { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } | 172 | { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } |
| 162 | ]; | 173 | ]; |
| @@ -227,7 +238,8 @@ with flakeInputs.nixVirt.lib; | |||
| 227 | { definition = volume.writeXML { | 238 | { definition = volume.writeXML { |
| 228 | type = "file"; | 239 | type = "file"; |
| 229 | name = "lmmirzm-vmrz01.qcow2"; | 240 | name = "lmmirzm-vmrz01.qcow2"; |
| 230 | capacity = { count = 40; unit = "GB"; }; | 241 | allocation = { count = 0; }; |
| 242 | capacity = { count = 256; unit = "GB"; }; | ||
| 231 | target = { | 243 | target = { |
| 232 | path = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; | 244 | path = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; |
| 233 | format.type = "qcow2"; | 245 | format.type = "qcow2"; |
| @@ -238,6 +250,7 @@ with flakeInputs.nixVirt.lib; | |||
| 238 | { definition = volume.writeXML { | 250 | { definition = volume.writeXML { |
| 239 | type = "file"; | 251 | type = "file"; |
| 240 | name = "vmrz02.qcow2"; | 252 | name = "vmrz02.qcow2"; |
| 253 | allocation = { count = 0; }; | ||
| 241 | capacity = { count = 256; unit = "GB"; }; | 254 | capacity = { count = 256; unit = "GB"; }; |
| 242 | target = { | 255 | target = { |
| 243 | path = "/home/gkleen/.local/share/libvirt/images/vmrz02.qcow2"; | 256 | path = "/home/gkleen/.local/share/libvirt/images/vmrz02.qcow2"; |
| @@ -249,6 +262,7 @@ with flakeInputs.nixVirt.lib; | |||
| 249 | { definition = volume.writeXML { | 262 | { definition = volume.writeXML { |
| 250 | type = "file"; | 263 | type = "file"; |
| 251 | name = "vmrz03.qcow2"; | 264 | name = "vmrz03.qcow2"; |
| 265 | allocation = { count = 0; }; | ||
| 252 | capacity = { count = 256; unit = "GB"; }; | 266 | capacity = { count = 256; unit = "GB"; }; |
| 253 | target = { | 267 | target = { |
| 254 | path = "/home/gkleen/.local/share/libvirt/images/vmrz03.qcow2"; | 268 | path = "/home/gkleen/.local/share/libvirt/images/vmrz03.qcow2"; |
