nixcfg/nixosModules/homeLab/virtualization/default.nix

22 lines
569 B
Nix
Raw Normal View History

{ pkgs, lib, config, ... }: {
options = {
2024-03-28 16:40:23 -04:00
homeLab.virtualization.enable =
lib.mkEnableOption "Enables podman and virt-manager virtualization.";
};
config = lib.mkIf config.homeLab.virtualization.enable {
programs.virt-manager.enable = true;
virtualisation = {
libvirtd.enable = true;
oci-containers = { backend = "podman"; };
podman = {
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
enable = true;
};
};
};
2024-03-28 16:40:23 -04:00
}