From 2677400a4369b8100aa7dea996ec04fc25157e6b Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 5 Jul 2023 13:03:41 +0800 Subject: [PATCH] lib/private: add `attachSopsPathPrefix` --- lib/private.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/private.nix b/lib/private.nix index 671b7f7b..943a39db 100644 --- a/lib/private.nix +++ b/lib/private.nix @@ -34,6 +34,14 @@ rec { lib.mapAttrs (path: attrs: attrs // (getKey path)) secrets; + attachSopsPathPrefix = prefix: secrets: + lib.mapAttrs' + (key: settings: + lib.nameValuePair + "${prefix}/${key}" + settings // { inherit key; }) + secrets; + getUsers = type: users: let userModules = lib.filesToAttr ../users/${type};