nix/lib/modules/nixos/podman.nix

37 lines
671 B
Nix
Raw Normal View History

2025-02-16 10:43:53 -06:00
{
pkgs,
config,
lib,
...
}:
{
config = lib.mkIf (config.virtualisation.oci-containers.backend == "podman") {
2025-02-16 10:43:53 -06:00
environment = {
systemPackages = with pkgs; [
podman-compose
];
};
virtualisation = {
podman = {
dockerCompat = true;
2025-02-16 10:43:53 -06:00
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
};
oci-containers = {
# backend = "podman";
2025-02-16 10:43:53 -06:00
};
};
networking = {
extraHosts = ''
127.0.0.1 host.docker.internal
::1 host.docker.internal
127.0.0.1 host.containers.internal
::1 host.containers.internal
'';
};
};
}