nixos/services/podman.nix

19 lines
483 B
Nix
Raw Normal View History

2023-06-07 01:14:47 +02:00
{ config, lib, pkgs, ... }:
with lib;
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;
dockerSocket.enable = withDocker;
dockerCompat = withDocker;
2023-06-07 01:14:47 +02:00
defaultNetwork = {
settings.dns_enabled = true;
};
};
environment.systemPackages = (with pkgs; [ podman-compose cntr ]) ++
(optional withDocker pkgs.docker-compose);
2023-06-07 01:14:47 +02:00
}