2017-04-10 19:53:16 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
programs.browserpass = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
2017-04-10 23:21:20 +02:00
|
|
|
Whether to install the NativeMessaging configuration for installed browsers.
|
2017-04-10 19:53:16 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf config.programs.browserpass.enable {
|
|
|
|
environment.systemPackages = [ pkgs.browserpass ];
|
|
|
|
environment.etc."chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
|
|
|
|
environment.etc."opt/chrome/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
|
|
|
|
};
|
|
|
|
}
|