Changes

Jump to navigation Jump to search

Installation on other distributions

1,606 bytes added, Yesterday at 22:09
Add NixOS section
echo "#lg-chown user" >> /etc/pve/qemu-server/$VMID.conf
</syntaxhighlight>
 
== NixOS 25.11 ==
 
=== Prerequisites ===
 
 
* NixOS 25.11 (unstable should work too)
* Looking Glass B7
* systemd 258 (because of [https://github.com/systemd/systemd/issues/39056 this])
 
=== Configuration ===
 
==== IVSHMEM with the KVMFR module ====
====== Installing and Loading =====
 
<syntaxhighlight lang=nix>
boot.extraModulePackages = [ config.boot.kernelPackages.kvmfr ];
boot.initrd.kernelModules = [ "kvmfr" ];
boot.kernelParams = [ "kvmfr.static_size_mb=64" ]; # replace with your calculated MEM requirement
</syntaxhighlight >
 
====== Permissions =====
 
<syntaxhighlight lang=nix>
services.udev.packages = lib.singleton (pkgs.writeTextFile
{
name = "kvmfr";
text = ''
SUBSYSTEM=="kvmfr", GROUP="kvm", MODE="0660", TAG+="uaccess"
'';
destination = "/etc/udev/rules.d/70-kvmfr.rules";
}
users.users = {
user = { # replace with your username
extraGroups = [ "kvm" ];
};
};
</syntaxhighlight >
 
====== CGroups =====
 
<syntaxhighlight lang=nix>
virtualisation.libvirtd.qemu = {
verbatimConfig = ''
namespaces = []
cgroup_device_acl = [
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
"/dev/kvmfr0"
]
'';
};
</syntaxhighlight >
 
==== Install the Looking Glass client ====
<syntaxhighlight lang=nix>
environment.systemPackages = with pkgs; [
looking-glass-client
];
</syntaxhighlight >
4

edits

Navigation menu