Files
nixos-config/hosts/common/extraServices/virtualisation.nix

30 lines
597 B
Nix
Raw Normal View History

2024-10-20 00:30:58 +02:00
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.extraServices.virtualisation;
in {
options.extraServices.virtualisation.enable = mkEnableOption "enable virtualisation";
config = mkIf cfg.enable {
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
};
};
};
programs.virt-manager.enable = true;
2026-03-14 09:26:13 +01:00
systemd.services.virt-secret-init-encryption.enable = false;
2025-05-19 14:39:49 +02:00
environment = {
systemPackages = [pkgs.qemu];
};
2024-10-20 00:30:58 +02:00
};
}