about summary refs log tree commit diff
path: root/nixos/modules/virtualisation/cri-o.nix
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2020-05-12 05:14:12 +1000
committerProfpatsch <mail@profpatsch.de>2020-05-25 12:27:49 +0200
commiteeff166faa82fd8a38c8da632863e2203ccf8235 (patch)
tree40bb79b67cd29ee60d52a4cbab3652d461ea8157 /nixos/modules/virtualisation/cri-o.nix
parent9e7fbc6f2c302f36ed43a43776da2a00179471e4 (diff)
downloadnixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.tar
nixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.tar.gz
nixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.tar.bz2
nixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.tar.lz
nixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.tar.xz
nixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.tar.zst
nixlib-eeff166faa82fd8a38c8da632863e2203ccf8235.zip
nixos/cri-o: add runtime option
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 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";