system/podman: have module available

This commit is contained in:
Felix Buehler 2022-12-05 22:53:04 +01:00
parent 19520eae7f
commit 7e9276152a
7 changed files with 56 additions and 6 deletions

View file

@ -0,0 +1,30 @@
# 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 {
environment.systemPackages = with pkgs; [
podman-compose
];
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;
};
};
}