Commit c26558c5 authored by René Neumann's avatar René Neumann
Browse files

nixos/podman: Introduce new option `extraRuntimes`

This disables the hard, not overridable, dependency on `runc`.
It also sharpens the description of `extraPackages` to highlight the
difference between those options.

Fixes #443274.
parent 1bc4de07
Loading
Loading
Loading
Loading
+26 −16
Original line number Diff line number Diff line
@@ -103,13 +103,24 @@ in
    extraPackages = mkOption {
      type = with types; listOf package;
      default = [ ];
      description = ''
        Extra dependencies for podman to be placed on $PATH in the wrapper.
      '';
    };

    extraRuntimes = mkOption {
      type = with types; listOf package;
      # keep the default in sync with the podman package
      default = lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.runc ];
      defaultText = lib.literalExpression ''lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.runc ]'';
      example = lib.literalExpression ''
        [
          pkgs.gvisor
        ]
      '';
      description = ''
        Extra packages to be installed in the Podman wrapper.
        Extra runtime packages to be installed in the Podman wrapper.
        Those are then placed in libexec/podman, i.e. are seen as podman internal commands.
      '';
    };

@@ -161,9 +172,8 @@ in
                config.systemd.package # To allow systemd-based container healthchecks
              ]
              ++ lib.optional (config.boot.supportedFilesystems.zfs or false) config.boot.zfs.package;
            extraRuntimes = [
              pkgs.runc
            ]
            extraRuntimes =
              cfg.extraRuntimes
              ++
                lib.optionals
                  (