diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2024-10-30 09:13:11 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2024-10-30 09:13:11 +0100 |
| commit | 8167dec3203cc5e9751b799f751fe56ea2d655b7 (patch) | |
| tree | 87cb2c8220bbb1edfe8fd2efd29de4ce115125dd /accounts/gkleen@sif/libvirt/default.nix | |
| parent | 5d8436e8c8df1f552e017e924235ee7cc50c5b82 (diff) | |
| download | nixos-8167dec3203cc5e9751b799f751fe56ea2d655b7.tar nixos-8167dec3203cc5e9751b799f751fe56ea2d655b7.tar.gz nixos-8167dec3203cc5e9751b799f751fe56ea2d655b7.tar.bz2 nixos-8167dec3203cc5e9751b799f751fe56ea2d655b7.tar.xz nixos-8167dec3203cc5e9751b799f751fe56ea2d655b7.zip | |
...
Diffstat (limited to 'accounts/gkleen@sif/libvirt/default.nix')
| -rw-r--r-- | accounts/gkleen@sif/libvirt/default.nix | 38 |
1 files changed, 37 insertions, 1 deletions
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 @@ | |||
| 1 | { flakeInputs, ... }: | 1 | { flakeInputs, lib, ... }: |
| 2 | 2 | ||
| 3 | with lib; | ||
| 3 | with flakeInputs.nixVirt.lib; | 4 | with flakeInputs.nixVirt.lib; |
| 4 | 5 | ||
| 5 | { | 6 | { |
| @@ -7,6 +8,41 @@ with flakeInputs.nixVirt.lib; | |||
| 7 | virtualisation.libvirt = { | 8 | virtualisation.libvirt = { |
| 8 | enable = true; | 9 | enable = true; |
| 9 | connections."qemu:///session" = { | 10 | connections."qemu:///session" = { |
| 11 | domains = [ | ||
| 12 | { definition = domain.writeXML (recursiveUpdate (domain.templates.windows { | ||
| 13 | name = "lmmirzm-vmrz01"; | ||
| 14 | uuid = "9e1dab2e-7986-4cb3-88af-6fad8969e15f"; | ||
| 15 | memory = { count = 16; unit = "GiB"; }; | ||
| 16 | storage_vol = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; | ||
| 17 | nvram_path = "/home/gkleen/.local/share/libvirt/lmmirzm-vmrz01.nvram"; | ||
| 18 | virtio_net = true; | ||
| 19 | virtio_drive = true; | ||
| 20 | virtio_video = false; | ||
| 21 | install_virtio = true; | ||
| 22 | }) { | ||
| 23 | vcpu.count = 4; | ||
| 24 | os.bootmenu.enable = true; | ||
| 25 | devices.graphics = { | ||
| 26 | listen.type = "address"; | ||
| 27 | # gl.enable = true; | ||
| 28 | }; | ||
| 29 | devices.interface = { | ||
| 30 | type = "bridge"; | ||
| 31 | mac.address = "52:54:00:b9:f3:ed"; | ||
| 32 | source.bridge = "gre-0971"; | ||
| 33 | }; | ||
| 34 | }); | ||
| 35 | } | ||
| 36 | ]; | ||
| 37 | pools = [ | ||
| 38 | { definition = ./pool-default.xml; | ||
| 39 | active = true; | ||
| 40 | volumes = [ | ||
| 41 | { definition = ./vol-lmmirzm-vmrz01.xml; | ||
| 42 | } | ||
| 43 | ]; | ||
| 44 | } | ||
| 45 | ]; | ||
| 10 | }; | 46 | }; |
| 11 | }; | 47 | }; |
| 12 | }; | 48 | }; |
