summary refs log tree commit diff
path: root/nixos/modules/virtualisation/containers.nix
Commit message (Collapse)AuthorAge
* nixos/containers: source policy from separate skopeo outputzowoq2023-01-08
|
* nixos/{containers,cri-o/podman}: drop outdated remove/renamezowoq2022-08-30
| | | | these have been around for a few release cycles
* nixos/{containers,podman}: nixpkgs-fmtzowoq2022-08-19
|
* nixos/virtualization: invariant option docs MD conversionspennae2022-07-24
|
* nixos/doc: clean up defaults and examplesNaïm Favier2021-10-04
|
* nixos/containers: add storage.confEdward Tjörnhammar2021-06-05
|
* Revert "nixos/containers: add storage.conf"zowoq2021-06-03
| | | | | | | This file requires some defaults to be set otherwise podman, etc errors. It also broke the podman nixos tests. This reverts commit 7a4de9a9839617f62874df57f31bc77d708604bc.
* nixos/containers: add storage.confEdward Tjörnhammar2021-06-02
|
* nixos/containers: Add virtualisation.containers.containersConf.cniPluginsRobert Hensing2021-05-31
|
* nixos/containers: move extraConfig to settings modelPhillip Cloud2021-04-07
|
* nixos/containers: add catatonit / init_pathzowoq2021-03-21
| | | | | | https://github.com/containers/common/blob/master/docs/containers.conf.5.md - Also drop unneeded true from ociSeccompBpfHook
* nixos/{containers,cri-o,podman}: move copyFile to nixos/lib/utilszowoq2020-09-24
|
* nixos/containers: add oci-seccomp-bpf-hookSascha Grunert2020-09-02
| | | | Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* nixos/containers: correct isNormaUser to isNormalUser06kellyjac2020-07-19
| | | | Correct a small spelling slip up
* nixos.users-groups: Set up subuid/subgid mappings for all normal usersadisbladis2020-07-13
| | | | | | | | This is required by (among others) Podman to run containers in rootless mode. Other distributions such as Fedora and Ubuntu already set up these mappings. The scheme with a start UID/GID offset starting at 100000 and increasing in 65536 increments is copied from Fedora.
* nixos/{podman,containers}: libpod.conf -> containers.confzowoq2020-06-26
|
* nixos/containers: move libpod to nixos/podmanzowoq2020-04-24
|
* nixos.virtualisation.containers: Init common /etc/containers configuration ↵adisbladis2020-04-21
| | | | | | | | | | module What's happening now is that both cri-o and podman are creating /etc/containers/policy.json. By splitting out the creation of configuration files we can make the podman module leaner & compose better with other container software.
* nixos.virtualisation: Move containers.nix to nixos-containers.nixadisbladis2020-04-21
| | | | In anticipation of the new containers module.
* nixos-containers: Add support for custom nixpkgs argumentadisbladis2020-04-20
|
* nixos/treewide: Fix incorrectly rendered examplesSilvan Mosberger2020-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Many options define their example to be a Nix value without using literalExample. This sometimes gets rendered incorrectly in the manual, causing confusion like in https://github.com/NixOS/nixpkgs/issues/25516 This fixes it by using literalExample for such options. The list of option to fix was determined with this expression: let nixos = import ./nixos { configuration = {}; }; lib = import ./lib; valid = d: { # escapeNixIdentifier from https://github.com/NixOS/nixpkgs/pull/82461 set = lib.all (n: lib.strings.escapeNixIdentifier n == n) (lib.attrNames d) && lib.all (v: valid v) (lib.attrValues d); list = lib.all (v: valid v) d; }.${builtins.typeOf d} or true; optionList = lib.optionAttrSetToDocList nixos.options; in map (opt: { file = lib.elemAt opt.declarations 0; loc = lib.options.showOption opt.loc; }) (lib.filter (opt: if opt ? example then ! valid opt.example else false) optionList) which when evaluated will output all options that use a Nix identifier that would need escaping as an attribute name.
* nixos/containers: use machinectl poweroffFlorian Klink2019-12-30
| | | | | | | | Previously, we were storing the leader pid in a runtime file and signalled SIGRTMIN+4 manually. In systemd 219, the `machinectl poweroff` command was introduced, which does that for us.
* nixos/containers: fix handling of cfg.additionalCapabilitiesEnno Lohmeier2019-11-07
|
* nixos/containers: explicitly load kernel modules for networkingJoachim Fasting2019-10-05
| | | | | | | List all modules that *may* be required depending on individual container configurations; don't expect that further modules can be loaded after boot. Fixes https://github.com/NixOS/nixpkgs/issues/38676
* Merge branch 'master' into stagingVladimír Čunát2019-09-02
|\
| * nixos/modules: Remove all usages of types.stringSilvan Mosberger2019-08-31
| | | | | | | | | | | | And replace them with a more appropriate type Also fix up some minor module problems along the way
* | Merge staging-next into stagingFrederik Rietdijk2019-08-31
|\|
| * nixos-containers: add TimeoutStartSec optiondavidak2019-08-28
| | | | | | | | | | | | | | | | Default is now 1m instead of global default of 15sec. It is also configurable. Fixes issue where start of many containers (40+) fail https://github.com/NixOS/nixpkgs/issues/65001
* | Merge staging-next into stagingFrederik Rietdijk2019-08-28
|\|
| * Revert "nixos/containers: add unprivileged option"Marek Mahut2019-08-23
| |
| * Merge pull request #67130 from uvNikita/containers/unprivilegedMarek Mahut2019-08-23
| |\ | | | | | | nixos/containers: add unprivileged option
| | * nixos/containers: add unprivileged optionNikita Uvarov2019-08-21
| | | | | | | | | | | | Fixes #57083.
| * | nixos/containers: fix imperative containersNikita Uvarov2019-08-21
| |/ | | | | | | Fixes #67174.
| * nixos/containers: add 'ephemeral' optionNikita Uvarov2019-08-19
| |
* | treewide: remove redundant quotesvolth2019-08-26
|/
* TypoEelco Dolstra2019-06-25
|
* Merge pull request #62712 from danbst/module-conflict-namingDanylo Hlynskyi2019-06-13
|\ | | | | NixOS module system: improve one of error messages
| * nixos/containers: give a name to an anonymous container moduledanbst2019-06-05
| | | | | | | | | | | | | | | | See https://github.com/NixOS/nixpkgs/issues/15747. Previously this module was called `<unknown-file>` in error messages, now it is called a bit more close to real: ``` module at /home/danbst/dev/nixpkgs/nixos/modules/virtualisation/containers.nix:470 ```
* | nixos containers: restart containers with autoStart = true when their conf ↵Graham Christensen2019-06-06
| | | | | | | | changes
* | nixos containers: don't shadow config, rename to containerConfigGraham Christensen2019-06-06
|/
* nixos/containers: create veths if only IPv6 is configuredrnhmjoj2019-03-20
| | | | This fixes the failing nixos.tests.containers-ipv6 test. Thanks to andir.
* Merge pull request #53419 from uvNikita/containers/fix-bridgeFlorian Klink2019-01-28
|\ | | | | nixos/containers: add bridge without address specified
| * nixos/containers: add bridge without address specifiedNikita Uvarov2019-01-07
| | | | | | | | | | | | According to systemd-nspawn(1), --network-bridge implies --network-veth, and --port option is supported only when private networking is enabled. Fixes #52417.
* | nixos/containers: explicitly set link up on host for extraVethselseym2019-01-13
|/
* Merge pull request #51393 from arianvp/container-namesFlorian Klink2018-12-05
|\ | | | | nixos/containers: Add assertion for container name length
| * nixos/containers: Add assertion for container name lengthArian van Putten2018-12-02
| | | | | | | | | | | | | | | | | | When privateNetwork is enabled, currently the container's interface name is derived from the container name. However, there's a hard limit on the size of interface names. To avoid conflicts and other issues, we set a limit on the container name when privateNetwork is enabled. Fixes #38509
* | Merge pull request #49392 from uvNikita/nixos/containers/vethsJörg Thalheim2018-12-03
|\ \ | |/ |/| nixos/containers: don't create veths if not configured
| * nixos/containers: don't create veths if not configuredNikita Uvarov2018-10-29
| | | | | | | | | | | | | | | | Previously, setting "privateNetwork = true" without specifying host and local addresses would create unconfigured interfaces: ve-$INSTANCE on the host and eth0 inside the container. These changes is rebased part of the original PR #3021.
* | Merge pull request #48771 from arianvp/container-tweaksJörg Thalheim2018-10-31
|\ \ | | | | | | nixos/containers: Introduce several tweaks to systemd-nspawn from upstream systemd
| * | nixos/containers: Introduce several tweaks to systemd-nspawn from upstream ↵Arian van Putten2018-10-22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systemd * Lets container@.service be activated by machines.target instead of multi-user.target According to the systemd manpages, all containers that are registered by machinectl, should be inside machines.target for easy stopping and starting container units altogether * make sure container@.service and container.slice instances are actually located in machine.slice https://plus.google.com/112206451048767236518/posts/SYAueyXHeEX See original commit: https://github.com/NixOS/systemd/commit/45d383a3b8 * Enable Cgroup delegation for nixos-containers Delegate=yes should be set for container scopes where a systemd instance inside the container shall manage the hierarchies below its own cgroup and have access to all controllers. This is equivalent to enabling all accounting options on the systemd process inside the system container. This means that systemd inside the container is responsible for managing Cgroup resources for unit files that enable accounting options inside. Without this option, units that make use of cgroup features within system containers might misbehave See original commit: https://github.com/NixOS/systemd/commit/a931ad47a8 from the manpage: Turns on delegation of further resource control partitioning to processes of the unit. Units where this is enabled may create and manage their own private subhierarchy of control groups below the control group of the unit itself. For unprivileged services (i.e. those using the User= setting) the unit's control group will be made accessible to the relevant user. When enabled the service manager will refrain from manipulating control groups or moving processes below the unit's control group, so that a clear concept of ownership is established: the control group tree above the unit's control group (i.e. towards the root control group) is owned and managed by the service manager of the host, while the control group tree below the unit's control group is owned and managed by the unit itself. Takes either a boolean argument or a list of control group controller names. If true, delegation is turned on, and all supported controllers are enabled for the unit, making them available to the unit's processes for management. If false, delegation is turned off entirely (and no additional controllers are enabled). If set to a list of controllers, delegation is turned on, and the specified controllers are enabled for the unit. Note that additional controllers than the ones specified might be made available as well, depending on configuration of the containing slice unit or other units contained in it. Note that assigning the empty string will enable delegation, but reset the list of controllers, all assignments prior to this will have no effect. Defaults to false. Note that controller delegation to less privileged code is only safe on the unified control group hierarchy. Accordingly, access to the specified controllers will not be granted to unprivileged services on the legacy hierarchy, even when requested. The following controller names may be specified: cpu, cpuacct, io, blkio, memory, devices, pids. Not all of these controllers are available on all kernels however, and some are specific to the unified hierarchy while others are specific to the legacy hierarchy. Also note that the kernel might support further controllers, which aren't covered here yet as delegation is either not supported at all for them or not defined cleanly.