fix again
This commit is contained in:
@@ -94,37 +94,39 @@ in
|
|||||||
sops_secrets_map =
|
sops_secrets_map =
|
||||||
host:
|
host:
|
||||||
lib.mkMerge (
|
lib.mkMerge (
|
||||||
lib.mapAttrsToList (
|
lib.concatLists (
|
||||||
name: value:
|
lib.mapAttrsToList (
|
||||||
let
|
name: value:
|
||||||
hasHost = (lib.elem host value.hosts) || value.global;
|
let
|
||||||
isYamlOrJson = value.format == "yaml" || value.format == "json";
|
hasHost = (lib.elem host value.hosts) || value.global;
|
||||||
in
|
isYamlOrJson = value.format == "yaml" || value.format == "json";
|
||||||
(
|
in
|
||||||
(
|
(
|
||||||
[
|
(
|
||||||
(
|
[
|
||||||
if hasHost && !(isYamlOrJson && value.keys != [ ]) then
|
(
|
||||||
{
|
if hasHost && !(isYamlOrJson && value.keys != [ ]) then
|
||||||
${name} = {
|
{
|
||||||
inherit (value) format neededForUsers;
|
${name} = {
|
||||||
sopsFile = inputs.self + "/${cfg.secretsDir}/${name}";
|
inherit (value) format neededForUsers;
|
||||||
};
|
sopsFile = inputs.self + "/${cfg.secretsDir}/${name}";
|
||||||
}
|
};
|
||||||
else
|
}
|
||||||
{ }
|
else
|
||||||
)
|
{ }
|
||||||
]
|
)
|
||||||
++ (lib.map (v: {
|
]
|
||||||
"${name}-${v}" = {
|
++ (lib.map (v: {
|
||||||
inherit (value) format neededForUsers;
|
"${name}-${v}" = {
|
||||||
sopsFile = inputs.self + "/${cfg.secretsDir}/${name}";
|
inherit (value) format neededForUsers;
|
||||||
key = v;
|
sopsFile = inputs.self + "/${cfg.secretsDir}/${name}";
|
||||||
};
|
key = v;
|
||||||
}) value.keys)
|
};
|
||||||
|
}) value.keys)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
) secret_map
|
||||||
) secret_map
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user