nix/lib/modules/nixos/podman.nix
Daniel Flanagan 0bc0ba43a2
Some checks failed
/ check (push) Failing after 22s
dragon check passes
2025-02-16 10:43:53 -06:00

36 lines
677 B
Nix

{
pkgs,
config,
lib,
...
}:
{
config = lib.mkIf config.virtualisation.podman.enable {
environment = {
systemPackages = with pkgs; [
podman-compose
];
};
virtualisation = {
podman = {
dockerCompat = config.virtualisation.podman.enable;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
};
oci-containers = {
backend = "podman";
};
};
networking = {
extraHosts = ''
127.0.0.1 host.docker.internal
::1 host.docker.internal
127.0.0.1 host.containers.internal
::1 host.containers.internal
'';
};
};
}