darwin compatible commit, touching up on modules, common system ietms

This commit is contained in:
2024-12-18 20:09:08 -05:00
parent 1e3ffdf0a3
commit b6653cee0b
5 changed files with 39 additions and 47 deletions

View File

@ -4,37 +4,29 @@
pkgs,
...
}: let
cfg = config.containers;
cfg = config.containers.podman;
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";
description = "Additional container-related packages to install";
};
};
};
config = lib.mkIf cfg.enable (lib.attrsets.optionalAttrs (config.nixpkgs.hostPlatform.isLinux) {
virtualisation.podman = {
enable = true;
dockerCompat = cfg.dockerCompat;
enableOnBoot = true;
defaultNetwork.settings.dns_enabled = true;
};
}
// {
environment.systemPackages =
[
pkgs.podman-compose
pkgs.buildah
pkgs.skopeo
pkgs.dive
pkgs.container-diff
]
++ cfg.extraPackages;
});
config = lib.mkIf cfg.enable {
environment.systemPackages =
[
pkgs.podman
pkgs.podman-compose
pkgs.buildah
pkgs.skopeo
pkgs.dive
]
++ cfg.extraPackages;
};
}