feat(packs): opt-in package packs — media/office/dev/gaming/containers/compat

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-28 06:48:37 +02:00
commit 095f2ccf29
8 changed files with 449 additions and 0 deletions

View file

@ -0,0 +1,43 @@
# Containers pack — Docker + Podman.
#
# Unifies the docker config that was previously split between core.nix
# (basic enable + weekly autoPrune) and development.nix (daemon.settings
# buildkit + registry-mirror + autoPrune --all), plus the podman block
# that lived coding-gated in development.nix. Now a single source of truth
# gated on omni.packs.containers.enable. (The merged result is the union
# of the two old blocks — identical on any host that had both features on,
# e.g. omni.)
{ config, lib, ... }:
let
cfg = config.omni.packs.containers;
in
{
options.omni.packs.containers.enable =
lib.mkEnableOption "Containers pack (Docker + Podman)";
config = lib.mkIf cfg.enable {
virtualisation.docker = {
enable = true;
enableOnBoot = true;
daemon.settings = {
features = {
buildkit = true;
};
registry-mirrors = [ "https://mirror.gcr.io" ];
};
autoPrune = {
enable = true;
dates = "weekly";
flags = [ "--all" ];
};
};
# Podman as Docker alternative (dockerCompat off to avoid conflict).
virtualisation.podman = {
enable = true;
dockerCompat = false;
defaultNetwork.settings.dns_enabled = true;
};
};
}