2023-04-27 20:37:44 +02:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
let
|
|
|
|
podman_sock = "unix://$XDG_RUNTIME_DIR/podman/podman.sock";
|
|
|
|
podmanCompose = pkgs.runCommand "docker-compose-podman-compat"
|
|
|
|
{
|
|
|
|
buildInputs = [ pkgs.makeWrapper ];
|
|
|
|
} ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper '${pkgs.docker-compose}/bin/docker-compose' "$out/bin/podman-compose" \
|
|
|
|
--set-default "DOCKER_HOST" '${podman_sock}' \
|
|
|
|
--set-default DOCKER_BUILDKIT 0
|
|
|
|
'';
|
|
|
|
in
|
2021-09-09 23:24:25 +02:00
|
|
|
{
|
2023-04-27 20:37:44 +02:00
|
|
|
home.packages = [ podmanCompose ];
|
|
|
|
home.sessionVariables.DOCKER_HOST = podman_sock;
|
2021-09-09 23:24:25 +02:00
|
|
|
}
|