{ config, lib, pkgs, namespace, ... }: let cfg = config.${namespace}.services.protonmail; in { options.${namespace}.services.protonmail = { enable = lib.mkEnableOption "protonmail bridge"; }; config = lib.mkIf cfg.enable { services.protonmail-bridge = { enable = true; extraPackages = with pkgs; [ pass ]; }; home.packages = with pkgs; [ protonmail-bridge-gui ]; }; }