From 2e44c179920a7a0b975c7d3933f71e2a56bf6c2a Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Fri, 9 Jan 2026 10:21:35 -0800 Subject: [PATCH] nixos/yggdrasil: ensure freeformType attrs are resolved `lib.types.attrs` is too lenient, allowing for invalid yggdrasil configuration to make it's way into the final config. Since this configuration ends up in a JSON file, changing the `freeformType` to use the type definition from `pkgs.formats.json` allows for the configuration to resolve correctly. --- nixos/modules/services/networking/yggdrasil.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/yggdrasil.nix b/nixos/modules/services/networking/yggdrasil.nix index 3f2f0277f59a..5d2dc2b8cd41 100644 --- a/nixos/modules/services/networking/yggdrasil.nix +++ b/nixos/modules/services/networking/yggdrasil.nix @@ -13,7 +13,6 @@ let bool listOf str - attrs submodule ; cfg = config.services.yggdrasil; @@ -69,7 +68,7 @@ in settings = mkOption { type = submodule { - freeformType = attrs; + freeformType = (pkgs.formats.json { }).type; options = { PrivateKeyPath = mkOption { type = nullOr path;