2023-06-07 01:14:47 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2023-06-14 21:52:10 +02:00
|
|
|
let
|
|
|
|
withDocker = (elem "docker" config.machine.services);
|
|
|
|
in mkIf (elem "podman" config.machine.services) {
|
2023-06-07 01:14:47 +02:00
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
2023-06-14 21:52:10 +02:00
|
|
|
dockerSocket.enable = withDocker;
|
|
|
|
dockerCompat = withDocker;
|
2023-06-07 01:14:47 +02:00
|
|
|
defaultNetwork = {
|
|
|
|
settings.dns_enabled = true;
|
|
|
|
};
|
|
|
|
};
|
2023-06-16 23:30:06 +02:00
|
|
|
environment.systemPackages = (with pkgs; [ podman-compose cntr ]) ++
|
2023-06-14 21:52:10 +02:00
|
|
|
(optional withDocker pkgs.docker-compose);
|
2023-06-07 01:14:47 +02:00
|
|
|
}
|