Merge pull request #175662 from klemensn/firefox-smartcardSupport
This commit is contained in:
commit
79119a149b
|
@ -26,10 +26,14 @@ The `wrapFirefox` function allows to pass policies, preferences and extensions t
|
||||||
Pocket = false;
|
Pocket = false;
|
||||||
Snippets = false;
|
Snippets = false;
|
||||||
};
|
};
|
||||||
UserMessaging = {
|
UserMessaging = {
|
||||||
ExtensionRecommendations = false;
|
ExtensionRecommendations = false;
|
||||||
SkipOnboarding = true;
|
SkipOnboarding = true;
|
||||||
};
|
};
|
||||||
|
SecurityDevices = {
|
||||||
|
# Use a proxy module rather than `nixpkgs.config.firefox.smartcardSupport = true`
|
||||||
|
"PKCS#11 Proxy Module" = "${pkgs.p11-kit}/lib/p11-kit-proxy.so";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPrefs = ''
|
extraPrefs = ''
|
||||||
|
|
|
@ -118,28 +118,27 @@ let
|
||||||
lib.optionalAttrs usesNixExtensions {
|
lib.optionalAttrs usesNixExtensions {
|
||||||
ExtensionSettings = {
|
ExtensionSettings = {
|
||||||
"*" = {
|
"*" = {
|
||||||
blocked_install_message = "You can't have manual extension mixed with nix extensions";
|
blocked_install_message = "You can't have manual extension mixed with nix extensions";
|
||||||
installation_mode = "blocked";
|
installation_mode = "blocked";
|
||||||
};
|
};
|
||||||
|
|
||||||
} // lib.foldr (e: ret:
|
} // lib.foldr (e: ret:
|
||||||
ret // {
|
ret // {
|
||||||
"${e.extid}" = {
|
"${e.extid}" = {
|
||||||
installation_mode = "allowed";
|
installation_mode = "allowed";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) {} extensions;
|
) {} extensions;
|
||||||
} // lib.optionalAttrs usesNixExtensions {
|
|
||||||
Extensions = {
|
Extensions = {
|
||||||
Install = lib.foldr (e: ret:
|
Install = lib.foldr (e: ret:
|
||||||
ret ++ [ "${e.outPath}/${e.extid}.xpi" ]
|
ret ++ [ "${e.outPath}/${e.extid}.xpi" ]
|
||||||
) [] extensions;
|
) [] extensions;
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs smartcardSupport {
|
} // lib.optionalAttrs smartcardSupport {
|
||||||
SecurityDevices = {
|
SecurityDevices = {
|
||||||
"OpenSC PKCS#11 Module" = "onepin-opensc-pkcs11.so";
|
"OpenSC PKCS#11 Module" = "opensc-pkcs11.so";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// extraPolicies;
|
// extraPolicies;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue