2023-09-11 20:23:04 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-20 20:32:38 +01:00
|
|
|
with lib;
|
|
|
|
let
|
2023-09-11 20:23:04 +02:00
|
|
|
withDocker = elem "docker" config.machine.services;
|
|
|
|
in
|
2024-11-20 20:32:38 +01:00
|
|
|
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
|
|
|
};
|
2024-11-20 20:32:38 +01:00
|
|
|
};
|
|
|
|
environment.systemPackages =
|
|
|
|
(with pkgs; [
|
|
|
|
podman-compose
|
|
|
|
cntr
|
|
|
|
img
|
|
|
|
skopeo
|
|
|
|
])
|
|
|
|
++ (optional withDocker pkgs.docker-compose);
|
|
|
|
}
|