nix/modules/core/virtualisation.nix

32 lines
770 B
Nix

{
config,
lib,
pkgs,
...
}:
lib.mkIf config.bchmnn.collections.virtualisation.enable {
virtualisation = {
libvirtd.enable = true;
/*
podman = {
enable = true;
# create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
*/
docker = {
enable = true;
};
oci-containers = {
backend = "docker";
# backend = "podman";
};
containers = {
enable = true;
};
};
hardware.nvidia-container-toolkit.enable = config.bchmnn.nvidia.enable;
environment.systemPackages = with pkgs; [ virtiofsd ];
}