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