anchor.diff:  
       environment.etc."crictl.yaml".source = utils.copyFile "${pkgs.cri-o-unwrapped.src}/crictl.yaml";
   
  -    environment.etc."crio/crio.conf.d/00-default.conf".text = ''
  -      [crio]
  -      storage_driver = "${cfg.storageDriver}"
  +    virtualisation.cri-o.settings.crio = {
  +      storage_driver = cfg.storageDriver;
   
  -      [crio.image]
  -      ${optionalString (cfg.pauseImage != null) ''pause_image = "${cfg.pauseImage}"''}
  -      ${optionalString (cfg.pauseCommand != null) ''pause_command = "${cfg.pauseCommand}"''}
  +      image = {
  +        pause_image = lib.mkIf (cfg.pauseImage != null) cfg.pauseImage;
  +        pause_command = lib.mkIf (cfg.pauseCommand != null) cfg.pauseCommand;
  +      };
   
  -      [crio.network]
  -      plugin_dirs = ["${pkgs.cni-plugins}/bin/"]
  -      ${optionalString (cfg.networkDir != null) ''network_dir = "${cfg.networkDir}"''}
  +      network = {
  +        plugin_dirs = [ "${pkgs.cni-plugins}/bin" ];
  +        network_dir = lib.mkIf (cfg.networkDir != null) cfg.networkDir;
  +      };
   
  -      [crio.runtime]
  -      cgroup_manager = "systemd"
  -      log_level = "${cfg.logLevel}"
  -      pinns_path = "${cfg.package}/bin/pinns"
  -      hooks_dir = [
  -      ${lib.optionalString config.virtualisation.containers.ociSeccompBpfHook.enable
  -        ''"${config.boot.kernelPackages.oci-seccomp-bpf-hook}",''}
  -      ]
  +      runtime = {
  +        cgroup_manager = "systemd";
  +        log_level = cfg.logLevel;
  +        manage_ns_lifecycle = true;
  +        pinns_path = "${cfg.package}/bin/pinns";
  +        hooks_dir =
  +          optional (config.virtualisation.containers.ociSeccompBpfHook.enable)
  +            config.boot.kernelPackages.oci-seccomp-bpf-hook;
   
  -      ${optionalString (cfg.runtime != null) ''
  -      default_runtime = "${cfg.runtime}"
  -      [crio.runtime.runtimes]
  -      [crio.runtime.runtimes.${cfg.runtime}]
  -      ''}
  -    '';
  +        default_runtime = lib.mkIf (cfg.runtime != null) cfg.runtime;
  +        runtimes = lib.mkIf (cfg.runtime != null) {
  +          "${cfg.runtime}" = { };
  +        };
  +      };
  +    };
   
       environment.etc."cni/net.d/10-crio-bridge.conf".source = utils.copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/10-crio-bridge.conf";
       environment.etc."cni/net.d/99-loopback.conf".source = utils.copyFile "${pkgs.cri-o-unwrapped.src}/contrib/cni/99-loopback.conf";
  +    environment.etc."crio/crio.conf.d/00-default.conf".source = cfgFile;
   
       # Enable common /etc/containers configuration
       virtualisation.containers.enable = true;
  
positive.code:       description = "Override the network_dir option.";
        internal = true;
      };
    };
  
    config = mkIf cfg.enable {
  
negative.code:         TimeoutStartSec = "0";
          Restart = "on-abnormal";
        };
        restartTriggers = [ cfgFile ];
      };
    };
  }
  