2022-05-05 23:01:56 -04:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-04-28 22:43:50 -04:00
|
|
|
|
2022-12-21 14:18:03 -07:00
|
|
|
options = {
|
2023-02-20 17:49:00 -05:00
|
|
|
_1password = {
|
2022-12-21 14:18:03 -07:00
|
|
|
enable = lib.mkEnableOption {
|
|
|
|
description = "Enable 1Password.";
|
|
|
|
default = false;
|
|
|
|
};
|
2022-04-28 22:43:50 -04:00
|
|
|
};
|
|
|
|
};
|
2022-06-13 23:43:49 -04:00
|
|
|
|
2024-01-24 21:52:33 -05:00
|
|
|
config = lib.mkIf (config.gui.enable && config._1password.enable) {
|
|
|
|
unfreePackages = [ "1password" "_1password-gui" "1password-cli" ];
|
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
home.packages = with pkgs; [ _1password-gui ];
|
2022-12-21 14:18:03 -07:00
|
|
|
};
|
|
|
|
|
2024-01-24 21:52:33 -05:00
|
|
|
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
2024-01-25 07:55:31 -05:00
|
|
|
# On Mac, does not apply: https://1password.community/discussion/142794/app-and-browser-integration
|
|
|
|
# However, the button doesn't work either:
|
|
|
|
# https://1password.community/discussion/140735/extending-support-for-trusted-web-browsers
|
2024-01-24 21:52:33 -05:00
|
|
|
environment.etc."1password/custom_allowed_browsers".text = ''
|
2024-01-25 07:55:31 -05:00
|
|
|
${
|
|
|
|
config.home-manager.users.${config.user}.programs.firefox.package
|
|
|
|
}/Applications/Firefox.app/Contents/MacOS/firefox
|
2024-01-24 21:52:33 -05:00
|
|
|
firefox
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-04-28 22:43:50 -04:00
|
|
|
}
|