Open wangkev opened 4 years ago
Here's what I found after a bit of research.
There're a couple of ways to install extension manually:
/usr/share/chromium/extensions
// /usr/share/chromium/extensions/pjmbgaakjkbhpopmakjoedenlfdmcdgm.json
{
"external_crx": "/usr/lib/browserpass-chromium/browserpass-chromium-3.1.1.crx",
"external_version": "3.1.1"
}
But this won't work now: https://github.com/brave/brave-browser/issues/5761
.config/BraveSoftware/Brave-Browser/Default/Extensions
Here lives the source of every extension, but I'm not sure if just putting a new extension here will enable it. TODO
This isn't a full solution to the problem, and it's home-manager based instead of NixOS based, but at least for extensions that are in the chrome web store, it should be possible by a minor addition to https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
Oh well, yeah that's possible and I just got it working. Some guys are currently working to add it to home-manager (https://github.com/nix-community/home-manager/pull/1626)
On 20/12/07 10:17PM, Jeff Huffman wrote:
This isn't a full solution to the problem, and it's home-manager based instead of NixOS based, but at least for extensions that are in the chrome web store, it should be possible by a minor addition to https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/NixOS/nixpkgs/issues/96687#issuecomment-740405136
Thanks for the suggestion @tejing1! @pniedzwiedzinski, can you share how you incorporated the pull request into your configuration? I am a nix noob.
@wangkev I have not used it
But guys, I was just setting up browserpass
with programs.browserpass.enable
and my brave just installed the plugin!!
{ config, lib, pkgs, ... }:
with lib;
{
options.programs.browserpass.enable = mkEnableOption "Browserpass native messaging host";
config = mkIf config.programs.browserpass.enable {
environment.etc = let
appId = "com.github.browserpass.native.json";
source = part: "${pkgs.browserpass}/lib/browserpass/${part}/${appId}";
in {
# chromium
"chromium/native-messaging-hosts/${appId}".source = source "hosts/chromium";
"chromium/policies/managed/${appId}".source = source "policies/chromium";
# chrome
"opt/chrome/native-messaging-hosts/${appId}".source = source "hosts/chromium";
"opt/chrome/policies/managed/${appId}".source = source "policies/chromium";
# vivaldi
"opt/vivaldi/native-messaging-hosts/${appId}".source = source "hosts/chromium";
"opt/vivaldi/policies/managed/${appId}".source = source "policies/chromium";
# brave
"opt/brave/native-messaging-hosts/${appId}".source = source "hosts/chromium";
"opt/brave/policies/managed/${appId}".source = source "policies/chromium";
};
nixpkgs.config.firefox.enableBrowserpass = true;
};
}
This way we could make it work!
I marked this as stale due to inactivity. → More info
Project description Similar to chrome, can brave browser also support installation of extensions declaratively?