summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/libvirt
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/libvirt')
-rw-r--r--accounts/gkleen@sif/libvirt/default.nix87
1 files changed, 87 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix
index 4e5a9b90..7d0972b5 100644
--- a/accounts/gkleen@sif/libvirt/default.nix
+++ b/accounts/gkleen@sif/libvirt/default.nix
@@ -137,6 +137,82 @@ with flakeInputs.nixVirt.lib;
137 }; 137 };
138 }); 138 });
139 } 139 }
140 { definition = domain.writeXML (recursiveUpdate (domain.templates.linux {
141 name = "vmrz03";
142 uuid = "1250a47c-3199-478d-8cf3-ea4a64c0567a";
143 memory = { count = 8; unit = "GiB"; };
144 storage_vol = "/home/gkleen/.local/share/libvirt/images/vmrz03.qcow2";
145 virtio_video = true;
146 }) {
147 os = {
148 loader =
149 {
150 readonly = true;
151 type = "pflash";
152 path = "${pkgs.OVMFFull.fd}/FV/OVMF_CODE.ms.fd";
153 };
154 nvram =
155 {
156 template = "${pkgs.OVMFFull.fd}/FV/OVMF_VARS.ms.fd";
157 path = "/home/gkleen/.local/share/libvirt/vmrz03.nvram";
158 };
159 bootmenu.enable = true;
160 };
161 qemu-commandline.env = [
162 { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; }
163 ];
164 vcpu.count = 4;
165 cpu = {
166 mode = "host-model";
167 feature = [
168 { name = "vmx"; policy = "require"; }
169 ];
170 };
171 devices.graphics = {
172 listen.type = "address";
173 gl.enable = false;
174 };
175 devices.video.model.acceleration.accel3d = false;
176 devices.interface = [
177 {
178 model.type = "virtio";
179 type = "bridge";
180 mac.address = "52:54:00:a1:f7:8a";
181 source.bridge = "rz-0971";
182 }
183 {
184 model.type = "virtio";
185 type = "bridge";
186 mac.address = "52:54:00:8d:d3:0b";
187 source.bridge = "rz-2403";
188 link.state = "down";
189 }
190 ];
191 devices.channel = [
192 {
193 type = "unix";
194 target = { type = "virtio"; name = "org.qemu.guest_agent.0"; };
195 }
196 {
197 type = "spicevmc";
198 target = { type = "virtio"; name = "com.redhat.spice.0"; };
199 }
200 {
201 type = "spiceport";
202 target = { type = "virtio"; name = "org.spice-space.webdav.0"; };
203 source.channel = "org.spice-space.webdav.0";
204 }
205 ];
206 devices.tpm = {
207 model = "tpm-tis";
208 backend =
209 {
210 type = "emulator";
211 version = "2.0";
212 };
213 };
214 });
215 }
140 ]; 216 ];
141 pools = [ 217 pools = [
142 { definition = pool.writeXML { 218 { definition = pool.writeXML {
@@ -171,6 +247,17 @@ with flakeInputs.nixVirt.lib;
171 }; 247 };
172 }; 248 };
173 } 249 }
250 { definition = volume.writeXML {
251 type = "file";
252 name = "vmrz03.qcow2";
253 capacity = { count = 256; unit = "GB"; };
254 target = {
255 path = "/home/gkleen/.local/share/libvirt/images/vmrz03.qcow2";
256 format.type = "qcow2";
257 features.lazy_refcounts = {};
258 };
259 };
260 }
174 ]; 261 ];
175 } 262 }
176 ]; 263 ];