mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
33 lines
1.1 KiB
Nix
33 lines
1.1 KiB
Nix
{ 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";
|
|
};
|
|
programs.firefox.nativeMessagingHosts.packages = [ pkgs.browserpass ];
|
|
};
|
|
}
|