summaryrefslogtreecommitdiff
path: root/hosts/sif/libvirt
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2024-08-22 14:48:24 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2024-08-22 14:48:24 +0200
commit567c22812fe1fbe525f1732661d253b3902710a9 (patch)
treeb78ce8007f265ed9d542f7992beca14a12327dec /hosts/sif/libvirt
parentd88404d51a6acd082e9917467862105ff1266367 (diff)
downloadnixos-567c22812fe1fbe525f1732661d253b3902710a9.tar
nixos-567c22812fe1fbe525f1732661d253b3902710a9.tar.gz
nixos-567c22812fe1fbe525f1732661d253b3902710a9.tar.bz2
nixos-567c22812fe1fbe525f1732661d253b3902710a9.tar.xz
nixos-567c22812fe1fbe525f1732661d253b3902710a9.zip
...
Diffstat (limited to 'hosts/sif/libvirt')
-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}