1 { config, lib, pkgs, ... }:
5 options.programs.browserpass.enable = lib.mkEnableOption "Browserpass native messaging host";
7 config = lib.mkIf config.programs.browserpass.enable {
9 appId = "com.github.browserpass.native.json";
10 source = part: "${pkgs.browserpass}/lib/browserpass/${part}/${appId}";
13 "chromium/native-messaging-hosts/${appId}".source = source "hosts/chromium";
14 "chromium/policies/managed/${appId}".source = source "policies/chromium";
17 "opt/chrome/native-messaging-hosts/${appId}".source = source "hosts/chromium";
18 "opt/chrome/policies/managed/${appId}".source = source "policies/chromium";
21 "opt/vivaldi/native-messaging-hosts/${appId}".source = source "hosts/chromium";
22 "opt/vivaldi/policies/managed/${appId}".source = source "policies/chromium";
25 "opt/brave/native-messaging-hosts/${appId}".source = source "hosts/chromium";
26 "opt/brave/policies/managed/${appId}".source = source "policies/chromium";
28 programs.firefox.nativeMessagingHosts.packages = [ pkgs.browserpass ];