summaryrefslogtreecommitdiffstats
path: root/modules/virt
diff options
context:
space:
mode:
Diffstat (limited to 'modules/virt')
-rw-r--r--modules/virt/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/virt/default.nix b/modules/virt/default.nix
new file mode 100644
index 0000000..2b6e8f7
--- /dev/null
+++ b/modules/virt/default.nix
@@ -0,0 +1,27 @@
+{ config, lib, pkgs, user, ... }:
+{
+ config = {
+ virtualisation.libvirtd.enable = true;
+ environment.systemPackages = with pkgs; [
+ virt-manager
+ libguestfs
+ guestfs-tools
+ ];
+ };
+
+ config.home-manager.users.${user} = {
+ dconf.settings = {
+ "org/virt-manager/virt-manager/connections" = {
+ autoconnect = ["qemu:///system"];
+ uris = ["qemu:///system"];
+ };
+ };
+
+ xdg.configFile."libvirt/qemu.conf".text = ''
+nvram = [
+ "/run/libvirt/nix-ovmf/AAVMF_CODE.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.fd",
+ "/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd"
+]
+ '';
+ };
+}