feat(virtualisation): improve libvirt config
This commit is contained in:
parent
a0807d7f0a
commit
3f073a83c4
|
@ -142,7 +142,8 @@ rec {
|
||||||
})
|
})
|
||||||
lib.createMediaGroup
|
lib.createMediaGroup
|
||||||
(lib.createUser "felschr" {
|
(lib.createUser "felschr" {
|
||||||
user.extraGroups = [ "wheel" "audio" "disk" "media" ];
|
user.extraGroups =
|
||||||
|
[ "wheel" "audio" "disk" "libvirtd" "qemu-libvirtd" "media" ];
|
||||||
modules = [ homeManagerModules.git ];
|
modules = [ homeManagerModules.git ];
|
||||||
config = ./home/felschr.nix;
|
config = ./home/felschr.nix;
|
||||||
usesContainers = true;
|
usesContainers = true;
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
# virtualisation.spiceUSBRedirection.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ virt-manager gnome.gnome-boxes ];
|
environment.systemPackages = with pkgs; [ virt-manager gnome.gnome-boxes ];
|
||||||
|
|
||||||
|
environment.sessionVariables.LIBVIRT_DEFAULT_URI = [ "qemu:///system" ];
|
||||||
|
|
||||||
|
# Users need to be in groups: libvirtd, qemu-libvirtd
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
virtualisation.libvirtd.qemu.runAsRoot = false;
|
||||||
|
virtualisation.libvirtd.qemu.ovmf.enable = true;
|
||||||
|
virtualisation.libvirtd.qemu.swtpm.enable = true;
|
||||||
|
virtualisation.libvirtd.onBoot = "ignore";
|
||||||
|
virtualisation.libvirtd.onShutdown = "shutdown";
|
||||||
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue