From 46241e156c26b6b738e028fec3b5f931e5a7ccf7 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 28 Apr 2022 04:51:50 +1200 Subject: [PATCH] nixos/virtualisation.oci-containers: Use podman as the default backend This has a number of benefits such as that applying service limits will actually work since there isn't a layer of indirection (the Docker daemon) between the systemd service and the container runtime. --- .../from_md/release-notes/rl-2205.section.xml | 13 +++++++++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 3 +++ nixos/modules/virtualisation/oci-containers.nix | 6 +----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 10608685c471..1e3f269dafb2 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -509,6 +509,19 @@ /etc/containers. + + + For new installations + virtualisation.oci-containers.backend is + now set to podman by default. If you still + want to use Docker on systems where + system.stateVersion is set to to + "22.05" set + virtualisation.oci-containers.backend = "docker";.Old + systems with older stateVersions stay with + docker. + + security.klogd was removed. Logging of diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 3b118d4e03d2..dcfabf01ff3d 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -164,6 +164,9 @@ In addition to numerous new and upgraded packages, this release has the followin This is to improve compatibility with `libcontainer` based software such as Podman and Skopeo which assumes they have ownership over `/etc/containers`. +- For new installations `virtualisation.oci-containers.backend` is now set to `podman` by default. + If you still want to use Docker on systems where `system.stateVersion` is set to to `"22.05"` set `virtualisation.oci-containers.backend = "docker";`.Old systems with older `stateVersion`s stay with "docker". + - `security.klogd` was removed. Logging of kernel messages is handled by systemd since Linux 3.5. diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index f40481727830..fa5fe9973044 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -338,11 +338,7 @@ in { backend = mkOption { type = types.enum [ "podman" "docker" ]; - default = - # TODO: Once https://github.com/NixOS/nixpkgs/issues/77925 is resolved default to podman - # if versionAtLeast config.system.stateVersion "20.09" then "podman" - # else "docker"; - "docker"; + default = if versionAtLeast config.system.stateVersion "22.05" then "podman" else "docker"; description = "The underlying Docker implementation to use."; };