From eeff166faa82fd8a38c8da632863e2203ccf8235 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 12 May 2020 05:14:12 +1000 Subject: [PATCH] nixos/cri-o: add runtime option --- nixos/modules/virtualisation/cri-o.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/modules/virtualisation/cri-o.nix b/nixos/modules/virtualisation/cri-o.nix index e73c5893fb5c..04f3c66915ef 100644 --- a/nixos/modules/virtualisation/cri-o.nix +++ b/nixos/modules/virtualisation/cri-o.nix @@ -48,6 +48,13 @@ in description = "Pause command to be executed"; }; + runtime = mkOption { + type = types.nullOr types.str; + default = null; + description = "Override the default runtime"; + example = [ "crun" ]; + }; + extraPackages = mkOption { type = with types; listOf package; default = [ ]; @@ -91,6 +98,12 @@ in cgroup_manager = "systemd" log_level = "${cfg.logLevel}" manage_ns_lifecycle = true + + ${optionalString (cfg.runtime != null) '' + default_runtime = "${cfg.runtime}" + [crio.runtime.runtimes] + [crio.runtime.runtimes.${cfg.runtime}] + ''} ''; environment.etc."cni/net.d/10-crio-bridge.conf".source = copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/10-crio-bridge.conf";