nixos/modules/gpuPassthrough/default.nix

26 lines
582 B
Nix
Raw Normal View History

2024-05-07 17:55:36 +02:00
{ config, pkgs, lib, ... }:
with lib;
{
options.customModules.gpuPassthrough = {
enable = mkEnableOption ''
Enable gpu passthgrouth with my custom configurations
'';
};
config =
let
cfg = config.customModules.gpuPassthrough;
in
mkIf cfg.enable {
programs.virt-manager.enable = true;
virtualisation.libvirtd = {
enable = true;
2024-05-08 12:29:11 +02:00
hooks.qemu = {
is_working = "${pkgs.writeShellScript "testHook.sh" ''
+ touch /tmp/qemu_hook_is_working
+ ''}";
};
2024-05-07 17:55:36 +02:00
};
};
}