2022-05-06 03:01:56 +00:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-04-29 02:43:50 +00:00
|
|
|
|
2022-12-21 21:18:03 +00:00
|
|
|
options = {
|
2023-02-20 22:49:00 +00:00
|
|
|
_1password = {
|
2022-12-21 21:18:03 +00:00
|
|
|
enable = lib.mkEnableOption {
|
|
|
|
description = "Enable 1Password.";
|
|
|
|
default = false;
|
|
|
|
};
|
2022-04-29 02:43:50 +00:00
|
|
|
};
|
|
|
|
};
|
2022-06-14 03:43:49 +00:00
|
|
|
|
2024-01-25 02:52:33 +00: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 21:18:03 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 02:52:33 +00:00
|
|
|
# https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
|
|
|
# Doesn't seem to fix the issue on macOS anyway
|
|
|
|
environment.etc."1password/custom_allowed_browsers".text = ''
|
|
|
|
${config.home-manager.users.${config.user}.programs.firefox.package}
|
|
|
|
firefox
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-04-29 02:43:50 +00:00
|
|
|
}
|