From 143a63e81ebea8b87608a9bf6a6da5f742391c7d Mon Sep 17 00:00:00 2001 From: _cry64 Date: Sun, 14 Dec 2025 21:46:47 +1000 Subject: [PATCH] fix: typo unwrapRes -> unwrapOk --- flake.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 1007b79..b8c59d2 100644 --- a/flake.nix +++ b/flake.nix @@ -110,21 +110,23 @@ Cerulean Nexus nodes must be provided as an attribute set, got "${builtins.typeOf nodeAttrs}" instead! Ensure all `cerulean.nexus.nodes.${name}` declarations are attribute sets under your call to `cerulean.mkNexus`. '' - # TODO: nodeAttrs.system won't display any nice error messages!! - # TODO: will mergeTypedStruct give nice error messages? or should I use mergeStructErr directly? else let templateAttrs = templateNode name nodeAttrs.system; S = nib.parse.parseStructFor templateAttrs nodeAttrs; in - nib.types.unwrapRes (_: + nib.types.unwrapOk (_: abort '' Cerulean failed to parse `cerulean.nexus.nodes.${name}`! mergeStruct should never return `result.Err`... How are you here?!? '') S; - # TODO: mapNodes = f: mapAttrs (name: nodeAttrs: f name (parseNode name nodeAttrs)) config.nexus.nodes - mapNodes = f: builtins.mapAttrs f (builtins.mapAttrs parseNode config.nexus.nodes); + # mapNodes = f: builtins.mapAttrs f (builtins.mapAttrs parseNode config.nexus.nodes); + mapNodes = f: + builtins.mapAttrs ( + name: nodeAttrs: f name (parseNode name nodeAttrs) + ) + config.nexus.nodes; in rec { nixosConfigurations = mapNodes ( _: node: