nix-config/modules/home-manager-modules/programs/proton-mail-pwa.nix

32 lines
777 B
Nix

{
lib,
pkgs,
config,
...
}: {
options.programs.proton-mail-pwa = {
enable = lib.mkEnableOption "enable Proton Mail PWA";
};
config = lib.mkIf config.programs.proton-mail-pwa.enable (lib.mkMerge [
{
xdg.desktopEntries.proton-mail-pwa = {
name = "Proton Mail";
type = "Application";
exec = "${pkgs.chromium}/bin/chromium --app=https://mail.proton.me";
icon = "chrome-jnpecgipniidlgicjocehkhajgdnjekh-Default";
terminal = false;
};
}
(
lib.mkIf config.impermanence.enable {
home.persistence."/persist${config.home.homeDirectory}" = {
directories = [
"${config.xdg.configHome}/chromium"
];
allowOther = true;
};
}
)
]);
}