From 0aa69a1ad899b9f12816b19d089f37f0dc3332d8 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 5 Jul 2023 13:34:41 +0800 Subject: [PATCH] lib/private: fix key override for getting secrets The secrets key and path shouldn't be overridden by the functions. The fix was simpler than I thought. --- lib/private.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private.nix b/lib/private.nix index 943a39db..e815d912 100644 --- a/lib/private.nix +++ b/lib/private.nix @@ -32,14 +32,14 @@ rec { getKey = key: { inherit key sopsFile; }; in lib.mapAttrs (path: attrs: - attrs // (getKey path)) secrets; + (getKey path) // attrs) secrets; attachSopsPathPrefix = prefix: secrets: lib.mapAttrs' (key: settings: lib.nameValuePair "${prefix}/${key}" - settings // { inherit key; }) + ({ inherit key; } // settings)) secrets; getUsers = type: users: