modules: system: add podman

This commit is contained in:
Bruno BELANYI 2022-01-12 18:22:43 +01:00
parent 1908897abc
commit e6fe5e57c9
3 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# Podman related settings
{ config, inputs, lib, options, pkgs, ... }:
let
cfg = config.my.system.podman;
in
{
options.my.system.podman = with lib; {
enable = mkEnableOption "podman configuration";
};
config = lib.mkIf cfg.enable {
virtualisation.podman = {
enable = true;
# Use fake `docker` command to redirect to `podman`
dockerCompat = true;
# Expose a docker-like socket
dockerSocket.enable = true;
# Allow DNS resolution in the default network
defaultNetwork.dnsname.enable = true;
};
};
}