22 lines
499 B
Nix
22 lines
499 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib; let
|
|
withDocker = elem "docker" config.machine.services;
|
|
in
|
|
mkIf (elem "podman" config.machine.services) {
|
|
virtualisation.podman = {
|
|
enable = true;
|
|
dockerSocket.enable = withDocker;
|
|
dockerCompat = withDocker;
|
|
defaultNetwork = {
|
|
settings.dns_enabled = true;
|
|
};
|
|
};
|
|
environment.systemPackages =
|
|
(with pkgs; [podman-compose cntr img skopeo])
|
|
++ (optional withDocker pkgs.docker-compose);
|
|
}
|