File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 77{
88 options . virtualisation . containerd-kubelet = {
99 enable = mkEnableOption "containerd as kubelet container runtime" ;
10+
11+ kata = {
12+ enable = mkEnableOption "enable kata container runtime" ;
13+
14+ package = lib . mkOption {
15+ type = lib . types . package ;
16+ default = pkgs . kata-runtime ;
17+ defaultText = lib . literalExpression "pkgs.kata-runtime" ;
18+ description = "Configured kata-runtime package." ;
19+ } ;
20+ } ;
1021 } ;
1122 config = mkIf cfg . enable {
12- environment . systemPackages = [ pkgs . cri-tools ] ;
23+ environment . systemPackages = [
24+ pkgs . cri-tools
25+ ] ++ lib . optional cfg . kata . enable cfg . kata . package ;
1326 environment . etc . "crictl.yaml" . text = ''
1427 runtime-endpoint: unix:///run/containerd/containerd.sock
1528 '' ;
3447 SystemdCgroup = true ;
3548 } ;
3649 } ;
50+ } // lib . optionalAttrs cfg . kata . enable {
51+ kata = {
52+ runtime_type = "io.containerd.kata.v2" ;
53+ } ;
3754 } ;
3855 } ;
3956 cni . bin_dir = "/opt/cni/bin" ;
5572 ## TODO: environment.etc."cni/net.d/99-loopback.conf".source = copyFile "${pkgs.containerd-unwrapped.src}/contrib/cni/99-loopback.conf";
5673
5774 systemd . services . containerd = {
58- path = [ pkgs . zfs pkgs . iptables-nftables-compat ] ;
75+ path = [
76+ pkgs . zfs
77+ pkgs . iptables-nftables-compat
78+ ] ++ lib . optional cfg . kata . enable cfg . kata . package ;
5979 serviceConfig = {
6080 # This limit was reduce from infinty to 1024:524288 as part of nixos 24.11. Raising that limit slightly.
6181 LimitNOFILE = "32768:524288" ;
You can’t perform that action at this time.
0 commit comments