move virt to virt/qemu

This commit is contained in:
smayzy
2025-07-07 23:43:25 +02:00
parent 581025d19b
commit 95968d0dae
2 changed files with 1 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
in
{
options.smayzy.virt.enable = mkOption {
type = types.bool;
default = false;
description = "enable virt-manager and qemu";
};
config = mkIf config.smayzy.virt.enable {
programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["smayzy"];
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemu.runAsRoot = false;
virtualisation.libvirtd.qemu.ovmf.enable = true;
environment.systemPackages = with pkgs; [
qemu_kvm
];
# https://wiki.nixos.org/wiki/QEMU
systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" ];
};
}