nix-files/hosts/common/programs/geary.nix

82 lines
2.0 KiB
Nix
Raw Normal View History

2023-10-24 04:50:31 +00:00
# geary is a gtk3 email client.
# outstanding issues:
# - it uses webkitgtk_4_1, which is expensive to build.
# could be upgraded to webkitgtk latest if upgraded to gtk4
# <https://gitlab.gnome.org/GNOME/geary/-/issues/1212>
{ config, lib, ... }:
let
cfg = config.sane.programs."gnome.geary";
in
2023-10-24 04:50:31 +00:00
{
sane.programs."gnome.geary" = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
slowToBuild = true; # uses webkitgtk 4.1
persist.byStore.private = [
2023-10-24 04:50:31 +00:00
# attachments, and email -- contained in a sqlite db
".local/share/geary"
2023-10-24 10:28:12 +00:00
# also `.cache/geary/web-resources`, which tends to stay << 1 MiB
2023-10-24 04:50:31 +00:00
];
2023-10-24 10:28:12 +00:00
fs.".config/geary/account_01/geary.ini".symlink.text = ''
2023-10-24 04:50:31 +00:00
[Metadata]
version=1
status=enabled
[Account]
ordinal=2
label=
# 14 = "fetch last 14d of mail every time i connect"
# -1 = "fetch *all* mail"
prefetch_days=-1
save_drafts=true
save_sent=true
use_signature=false
signature=
sender_mailboxes=colin@uninsane.org;
service_provider=other
[Folders]
archive_folder=Archive;
drafts_folder=
sent_folder=
junk_folder=
trash_folder=
[Incoming]
login=colin
remember_password=true
host=imap.uninsane.org
port=993
transport_security=transport
credentials=custom
[Outgoing]
remember_password=true
host=mx.uninsane.org
port=465
transport_security=transport
credentials=use-incoming
'';
services.geary = {
description = "Geary email client";
wantedBy = lib.mkIf cfg.config.autostart [ "default.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/geary";
Type = "simple";
Restart = "always";
RestartSec = "20s";
};
};
2023-10-24 04:50:31 +00:00
};
2023-10-24 04:50:31 +00:00
}