2017-04-10 18:53:16 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
options = {
|
2017-06-13 00:03:02 +01:00
|
|
|
programs.browserpass.enable = mkEnableOption "the NativeMessaging configuration for Chromium, Chrome, and Vivaldi.";
|
2017-04-10 18:53:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf config.programs.browserpass.enable {
|
|
|
|
environment.systemPackages = [ pkgs.browserpass ];
|
2017-06-13 00:03:02 +01:00
|
|
|
environment.etc = {
|
|
|
|
"chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
|
|
|
|
"chromium/policies/managed/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-policy.json";
|
|
|
|
"opt/chrome/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
|
|
|
|
"opt/chrome/policies/managed/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-policy.json";
|
|
|
|
};
|
2018-02-22 23:25:40 +00:00
|
|
|
nixpkgs.config.firefox.enableBrowserpass = true;
|
2017-04-10 18:53:16 +01:00
|
|
|
};
|
|
|
|
}
|