nixos-configuration/modules/libvirt.nix
Jakob Lechner e75d51a166 Remove obsolete option
The 'virtualisation.libvirtd.qemu.ovmf' submodule has been removed.
All OVMF images distributed with QEMU are now available by default.
2025-12-01 10:54:43 +01:00

34 lines
795 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.jalr;
in
{
options.jalr = {
libvirt = {
enable = pkgs.lib.mkEnableOption "Enable libvirt";
};
};
config = lib.mkIf cfg.libvirt.enable {
environment.systemPackages = with pkgs; lib.mkIf config.jalr.gui.enable [
spice-gtk
virt-manager
];
virtualisation = {
libvirtd = {
enable = true;
# start: starts all guests that were running prior to shutdown
# ignore: only start guests which are marked as autostart
onBoot = "ignore";
onShutdown = "shutdown";
};
};
security.wrappers.spice-client-glib-usb-acl-helper = {
owner = "root";
group = "root";
source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
};
};
}