initial commit
This commit is contained in:
commit
c094b5770c
113 changed files with 6879 additions and 0 deletions
42
hosts/16ach6/virtualisation.nix
Normal file
42
hosts/16ach6/virtualisation.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ inputs.synix.nixosModules.virtualisation ];
|
||||
|
||||
virtualisation = {
|
||||
vfio = {
|
||||
enable = true;
|
||||
IOMMUType = "amd";
|
||||
devices = [
|
||||
"10de:1f9d"
|
||||
];
|
||||
blacklistNvidia = true;
|
||||
ignoreMSRs = true;
|
||||
};
|
||||
libvirtd.deviceACL = [
|
||||
"/dev/kvm"
|
||||
"/dev/net/tun"
|
||||
"/dev/vfio/vfio"
|
||||
"/dev/null"
|
||||
"/dev/ptmx"
|
||||
];
|
||||
hugepages.enable = true;
|
||||
quickemu.enable = true;
|
||||
};
|
||||
|
||||
users.extraGroups.libvirtd.members = [ "sid" ];
|
||||
users.extraGroups.qemu-libvirtd.members = [ "sid" ];
|
||||
users.extraGroups.kvm.members = [ "sid" ];
|
||||
|
||||
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 sid libvirtd -" ];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.looking-glass-client
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue