Separated some settings

This commit is contained in:
Aleksandr Lebedev 2024-11-20 20:33:42 +01:00
parent 24a3ba6f99
commit 2147766e07
6 changed files with 148 additions and 57 deletions

39
nixos/libvirt.nix Normal file
View file

@ -0,0 +1,39 @@
{ pkgs, ... }:
let
username = "kylekrein";
in
{
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
};
};
spiceUSBRedirection.enable = true;
};
users.users.${username}.extraGroups = [ "libvirtd" ];
environment.systemPackages = with pkgs; [
spice
spice-gtk
spice-protocol
virt-viewer
#virtio-win
#win-spice
];
programs.virt-manager.enable = true;
home-manager.users.${username} = {
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
};
}