about summary refs log tree commit diff
path: root/nixos/modules/virtualisation/cri-o.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/virtualisation/cri-o.nix')
-rw-r--r--nixos/modules/virtualisation/cri-o.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/cri-o.nix b/nixos/modules/virtualisation/cri-o.nix
index e73c5893fb5cb..04f3c66915ef1 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";