modularized all the things

part one (?)
This commit is contained in:
2024-12-15 18:22:36 -05:00
parent d8a9e92dff
commit adabefd821
15 changed files with 848 additions and 45 deletions

View File

@ -1,7 +1,39 @@
{...}: {
virtualisation.podman = {
enable = true;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
{
config,
lib,
pkgs,
...
}: let
cfg = config.containers;
in {
options.containers = {
podman = {
enable = lib.mkEnableOption "Podman container runtime";
dockerCompat = lib.mkEnableOption "Enable Docker compatibility";
extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [];
description = "Additional packages to install when Podman is enabled";
};
};
};
config = lib.mkIf cfg.podman.enable {
virtualisation.podman = {
enable = true;
dockerCompat = cfg.podman.dockerCompat;
enableOnBoot = true;
defaultNetwork.settings.dns_enabled = true;
};
environment.systemPackages =
[
pkgs.podman-compose
pkgs.buildah
pkgs.skopeo
pkgs.dive
pkgs.container-diff
]
++ cfg.podman.extraPackages;
};
}