firefox: merge identical optionalAttrs block, fix indent

Two consecutive sets are pulled in under the same `usesNixExtensions`
condition.

Due to wrong indentation, it does however they are nested.

Fix both.
This commit is contained in:
Klemens Nanni 2022-06-01 02:12:26 +02:00
parent 787a444596
commit 5d27c8d53f

View file

@ -118,28 +118,27 @@ let
lib.optionalAttrs usesNixExtensions {
ExtensionSettings = {
"*" = {
blocked_install_message = "You can't have manual extension mixed with nix extensions";
installation_mode = "blocked";
};
blocked_install_message = "You can't have manual extension mixed with nix extensions";
installation_mode = "blocked";
};
} // lib.foldr (e: ret:
ret // {
"${e.extid}" = {
installation_mode = "allowed";
};
}
) {} extensions;
} // lib.optionalAttrs usesNixExtensions {
Extensions = {
Install = lib.foldr (e: ret:
ret ++ [ "${e.outPath}/${e.extid}.xpi" ]
) [] extensions;
};
} // lib.optionalAttrs smartcardSupport {
SecurityDevices = {
"OpenSC PKCS#11 Module" = "opensc-pkcs11.so";
};
}
ret // {
"${e.extid}" = {
installation_mode = "allowed";
};
}
) {} extensions;
Extensions = {
Install = lib.foldr (e: ret:
ret ++ [ "${e.outPath}/${e.extid}.xpi" ]
) [] extensions;
};
} // lib.optionalAttrs smartcardSupport {
SecurityDevices = {
"OpenSC PKCS#11 Module" = "opensc-pkcs11.so";
};
}
// extraPolicies;
};