diff --git a/nixos/modules/virtualisation/podman/default.nix b/nixos/modules/virtualisation/podman/default.nix index 962e5f494d15..f82fb5a99aee 100644 --- a/nixos/modules/virtualisation/podman/default.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -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,21 +172,20 @@ 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 - ] - ++ - lib.optionals - ( - config.virtualisation.containers.containersConf.settings.network.default_rootless_network_cmd or "" - == "slirp4netns" - ) - ( - with pkgs; - [ - slirp4netns - ] - ); + extraRuntimes = + cfg.extraRuntimes + ++ + lib.optionals + ( + config.virtualisation.containers.containersConf.settings.network.default_rootless_network_cmd or "" + == "slirp4netns" + ) + ( + with pkgs; + [ + slirp4netns + ] + ); }; };