From 27404b59778ec96e43c0058aa0f6e63d698b8b94 Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Thu, 23 Nov 2023 16:35:08 +0100 Subject: wonderland: set up virtualisation --- hosts/wonderland/default.nix | 1 + hosts/wonderland/virt.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 hosts/wonderland/virt.nix (limited to 'hosts') diff --git a/hosts/wonderland/default.nix b/hosts/wonderland/default.nix index 2510696..d052621 100644 --- a/hosts/wonderland/default.nix +++ b/hosts/wonderland/default.nix @@ -4,6 +4,7 @@ ./hardware.nix ./home.nix ./sops.nix + ./virt.nix (flakeRoot + /share/system/steam.nix) (flakeRoot + /share/system/hyprland.nix) #(flakeRoot + /share/system/spotifyd.nix) diff --git a/hosts/wonderland/virt.nix b/hosts/wonderland/virt.nix new file mode 100644 index 0000000..48a416d --- /dev/null +++ b/hosts/wonderland/virt.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: { + users.users.alice.extraGroups = [ "libvirtd" ]; + home-manager.users.alice.dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = [ "qemu:///system" ]; + uris = [ "qemu:///system" ]; + }; + }; + + programs.virt-manager.enable = true; + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + swtpm.enable = true; + }; + }; +} -- cgit v1.3.1