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:
parent
e0f2a3951f
commit
095f2ccf29
8 changed files with 449 additions and 0 deletions
43
modules/packs/containers.nix
Normal file
43
modules/packs/containers.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue