nixpkgs/nixos/modules/programs/browserpass.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.1 KiB
Nix
Raw Normal View History

2017-04-10 18:53:16 +01:00
{ config, lib, pkgs, ... }:
with lib;
{
options.programs.browserpass.enable = mkEnableOption "Browserpass native messaging host";
2017-04-10 18:53:16 +01:00
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";
2017-06-13 00:03:02 +01:00
};
nixpkgs.config.firefox.enableBrowserpass = true;
2017-04-10 18:53:16 +01:00
};
}