nix-config/modules/nix/virt.nix
2025-07-06 13:13:14 +02:00

21 lines
461 B
Nix

{ 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;
environment.systemPackages = with pkgs; [
qemu
];
};
}