summaryrefslogtreecommitdiff
path: root/hosts/sif/libvirt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/sif/libvirt/default.nix')
-rw-r--r--hosts/sif/libvirt/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/hosts/sif/libvirt/default.nix b/hosts/sif/libvirt/default.nix
new file mode 100644
index 00000000..b5d95996
--- /dev/null
+++ b/hosts/sif/libvirt/default.nix
@@ -0,0 +1,38 @@
1{ flakeInputs, ... }:
2
3with flakeInputs.nixVirt.lib;
4
5{
6 config = {
7 virtualisation.libvirtd.qemu.swtpm.enable = true;
8 virtualisation.libvirt = {
9 enable = true;
10 swtpm.enable = true;
11 connections."qemu:///system" = {
12 networks = [
13 { active = null;
14 definition = network.writeXML {
15 name = "default";
16 uuid = "012bfad7-4408-4345-8747-041853ef84c6";
17 forward.mode = "nat";
18 bridge = {
19 name = "virbr0";
20 stp = true;
21 delay = 0;
22 };
23 mac.address = "52:54:00:ad:34:af";
24 ip = {
25 address = "192.168.122.1";
26 netmask = "255.255.255.0";
27 dhcp.range = {
28 start = "192.168.122.2";
29 end = "192.168.122.254";
30 };
31 };
32 };
33 }
34 ];
35 };
36 };
37 };
38}