2023-09-11 20:23:04 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
};
|
2023-06-07 01:14:47 +02:00
|
|
|
};
|
2023-09-11 20:23:04 +02:00
|
|
|
environment.systemPackages =
|
2024-11-16 11:00:20 +01:00
|
|
|
(with pkgs; [podman-compose cntr img skopeo])
|
2023-09-11 20:23:04 +02:00
|
|
|
++ (optional withDocker pkgs.docker-compose);
|
|
|
|
}
|