2025-02-07 19:32:06 +01:00
|
|
|
{
|
|
|
|
name = "Podman";
|
|
|
|
description = ''
|
|
|
|
Provide support for running docker containers on the system
|
|
|
|
'';
|
|
|
|
|
|
|
|
nixosModule =
|
|
|
|
{ lib, config, ... }:
|
|
|
|
{
|
|
|
|
options.podman = {
|
|
|
|
containers = lib.mkOption {
|
|
|
|
type = lib.types.attrs;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.podman;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
virtualisation.containers.enable = true;
|
|
|
|
virtualisation.podman.enable = true;
|
|
|
|
virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
|
|
|
|
virtualisation.oci-containers.backend = "podman";
|
|
|
|
|
2025-02-11 17:21:09 +01:00
|
|
|
# TODO: Maybe we want to pre-fetch the images during build?
|
|
|
|
# This would ensure the config always reproduces the exact same system
|
2025-02-07 19:32:06 +01:00
|
|
|
virtualisation.oci-containers.containers = cfg.containers;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|