From 75fe3e04a5fe5e53cd83a0a45fd84e93cc7c538a Mon Sep 17 00:00:00 2001 From: rorosen Date: Thu, 6 Aug 2026 00:00:58 +0200 Subject: [PATCH] nixos/rancher: use yaml 1.2 for manifests Since https://github.com/NixOS/nixpkgs/pull/547212, a YAML directive (`%YAML 1.1`) is added to the top of the document. See https://yaml.org/spec/1.1/#id895631. This lets the k3s YAML parser fail with `did not find expected `. This affects only k3s manifests as rke2 manifests use JSON format. (cherry picked from commit 24720865f562c4b839e246c1e78df97e157afe96) --- nixos/modules/services/cluster/rancher/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/cluster/rancher/default.nix b/nixos/modules/services/cluster/rancher/default.nix index a1b59366fabd..c8c09a0b6685 100644 --- a/nixos/modules/services/cluster/rancher/default.nix +++ b/nixos/modules/services/cluster/rancher/default.nix @@ -29,7 +29,7 @@ let containerdConfigTemplateFile = "/var/lib/rancher/${name}/agent/etc/containerd/config.toml.tmpl"; staticContentChartDir = "/var/lib/rancher/${name}/server/static/charts"; - manifestFormat = if jsonManifests then pkgs.formats.json { } else pkgs.formats.yaml { }; + manifestFormat = if jsonManifests then pkgs.formats.json { } else pkgs.formats.yaml_1_2 { }; # Manifests need a valid suffix to be respected mkManifestTarget = name: