mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 15:43:55 -05:00
21 lines
569 B
Nix
21 lines
569 B
Nix
|
{ pkgs, lib, config, ... }: {
|
||
|
|
||
|
options = {
|
||
|
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;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|