diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2022-06-01 23:00:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-01 23:00:51 +0200 |
commit | 79119a149b7608977ba1513e18f83c2c2175b9f7 (patch) | |
tree | 749e31f43599a74445c8d747376145fca75e12d3 | |
parent | f1b44dde82f10b58d563d07264c0935591d2f265 (diff) | |
parent | 5d27c8d53fb70de7baac99ad3b12bfdeffdb699e (diff) | |
download | nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.tar nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.tar.gz nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.tar.bz2 nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.tar.lz nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.tar.xz nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.tar.zst nixpkgs-79119a149b7608977ba1513e18f83c2c2175b9f7.zip |
Merge pull request #175662 from klemensn/firefox-smartcardSupport
-rw-r--r-- | doc/builders/packages/firefox.section.md | 12 | ||||
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/wrapper.nix | 41 |
2 files changed, 28 insertions, 25 deletions
diff --git a/doc/builders/packages/firefox.section.md b/doc/builders/packages/firefox.section.md index 6f7d39c8b5e..0dd786a599d 100644 --- a/doc/builders/packages/firefox.section.md +++ b/doc/builders/packages/firefox.section.md @@ -26,10 +26,14 @@ The `wrapFirefox` function allows to pass policies, preferences and extensions t Pocket = false; Snippets = false; }; - UserMessaging = { - ExtensionRecommendations = false; - SkipOnboarding = true; - }; + UserMessaging = { + ExtensionRecommendations = false; + 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 = '' diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 6d93629e718..153bd31a5e7 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -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"; - }; - - } // 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" = "onepin-opensc-pkcs11.so"; + 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; + + 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; }; |