os/modules/virtualisation/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1 KiB
Nix
Raw Normal View History

2023-01-28 20:49:10 +00:00
{
lib,
config,
pkgs,
...
}:
let
2021-05-30 19:10:28 +00:00
psCfg = config.pub-solar;
2023-01-28 20:49:10 +00:00
in
{
boot.kernelParams = [
"amd_iommu=on"
"intel_iommu=on"
"iommu=pt"
];
2021-05-30 19:10:28 +00:00
virtualisation.libvirtd = {
enable = true;
qemu.ovmf.enable = true;
};
users.users."${psCfg.user.name}" = {
extraGroups = [ "libvirtd" ];
};
2021-05-30 19:10:28 +00:00
environment.systemPackages = with pkgs; [
libvirt
libvirt-glib
qemu
virt-manager
python3Packages.libvirt
gvfs
edk2
OVMF
win-virtio
looking-glass-client
lgcl
];
2021-05-30 19:10:28 +00:00
home-manager.users."${psCfg.user.name}" = {
xdg.dataFile."libvirt/.keep".text = "# this file is here to generate the directory";
home.packages = [ pkgs.obs-studio-plugins.looking-glass-obs ];
2021-05-30 19:10:28 +00:00
};
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 ${psCfg.user.name} kvm" ];
#networking.bridges.virbr1.interfaces = [];
#networking.interfaces.virbr1 = {
# ipv4.addresses = [
# {
# address = "192.168.123.1";
# prefixLength = 24;
# }
# ];
#};
2021-05-30 19:10:28 +00:00
}