idk
This commit is contained in:
parent
d616cdca1f
commit
9dc034ec86
23 changed files with 354 additions and 26 deletions
43
hosts/focalor/vfio.nix
Executable file
43
hosts/focalor/vfio.nix
Executable file
|
@ -0,0 +1,43 @@
|
|||
{ config, lib, system, pkgs, modulesPath, inputs, ... }:
|
||||
|
||||
{
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [(pkgs.OVMF.override {
|
||||
secureBoot = true;
|
||||
tpmSupport = true;
|
||||
}).fd];
|
||||
};
|
||||
};
|
||||
hooks.qemu = {
|
||||
win11 = ./scripts/vm-win11-hook.sh;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.libvirtd = {
|
||||
path = let
|
||||
env = pkgs.buildEnv {
|
||||
name = "qemu-hook-env";
|
||||
paths = with pkgs; [
|
||||
bash
|
||||
libvirt
|
||||
kmod
|
||||
systemd
|
||||
ripgrep
|
||||
sd
|
||||
];
|
||||
};
|
||||
in
|
||||
[ env ];
|
||||
};
|
||||
|
||||
users.extraUsers.regent.extraGroups = [ "libvirtd" ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue