From 222fca824906f5af9a7b7e3a43771e70ddc20942 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Fri, 4 Jul 2025 23:04:28 +0200 Subject: [PATCH] use `mapAttrs` right `mapAttrs'` takes two args rather than a set, whereas if only the val changes `mapAttrs (_: v: ...)` should do --- deployment/data-model.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/deployment/data-model.nix b/deployment/data-model.nix index f0b3bf35..4ad63bb1 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -20,11 +20,7 @@ let options.resources = mkOption { # TODO: maybe transpose, and group the resources by type instead type = attrsOf ( - attrTag ( - lib.mapAttrs' (name: resource: { - ${name} = mkOption { type = resource.request; }; - }) config.resources - ) + attrTag (lib.mapAttrs (_name: resource: mkOption { type = resource.request; }) config.resources) ); }; }; @@ -118,9 +114,7 @@ in # TODO: maybe transpose, and group the resources by type instead type = attrsOf ( attrTag ( - lib.mapAttrs' (name: resource: { - ${name} = mkOption { type = resource.policy; }; - }) config.resources + lib.mapAttrs (_name: resource: mkOption { type = submodule resource.policy; }) config.resources ) ); };