containers
A set of NixOS system configurations to be run as lightweight
containers. Each container appears as a service
container-«name»
on the host system, allowing it to be started and stopped via
systemctl.
- Type
attribute set of (submodule)- Default
{ }- Example
{ webserver = { path = "/nix/var/nix/profiles/webserver"; }; database = { config = { config, pkgs, ... }: { services.postgresql.enable = true; services.postgresql.package = pkgs.postgresql_14; system.stateVersion = "26.05"; }; }; }- Declared
- <nixpkgs/nixos/modules/virtualisation/nixos-containers.nix>