config.services.k3s = {
enable = true;
# Sets the snapshotter for embedded containerd.
snapshotter = "nix";
# Sets KUBECONFIG env var to point to k3s.
setKubeConfig = true;
# Sets CONTAINERD_* env vars to point to k3s embedded containerd.
setEmbeddedContainerd = true;
}
New options for containerd & containerd.rootless:
config.virtualisation.containerd = {
enable = true;
# Enable integration with nix-snapshotter.
nixSnapshotterIntegration = true;
# Set the CONTAINERD_* env vars, but also set automatically by
# `nixSnapshotterIntegration` or by `services.k3s.setEmbeddedContainerd`.
setAddress = "/run/containerd/containerd.sock";
setNamespace = "default";
setSnapshotter = "nix";
}
New option only for NixOS module containerd:
config.virtualisation.containerd = {
enable = true;
# Enable integration with k3s. This is mutually exclusive with setting
# `services.k3s.snapshotter` and `services.k3s.setEmbeddedContainerd`.
k3sIntegration = true;
};
Fixes #83
Highlights
nix run .#vm
andnix run .#vm-rootless
v1.27.9+k3s1
with patches to enable embedded nix-snapshotterk8sResources
flakeperSystem
output and plumb intospecialArgs
New options
Services
preload-containerd
&preload-containerd.rootless
:New options for
k3s
& new servicek3s.rootless
:New options for
containerd
&containerd.rootless
:New option only for NixOS module
containerd
:Migration guide v0.1.x -> v0.2.0
Removed
options.services.nix-snapshotter.setContainerdSnapshotter
Removed
options.services.nix-snapshotter.preloadContainerdImages