geary: integrate with swaync and auto-start

This commit is contained in:
Colin 2023-11-14 00:38:06 +00:00
parent 5b3a716819
commit 3855fb5eb6
5 changed files with 37 additions and 1 deletions

View File

@ -28,6 +28,8 @@
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
# sane.programs.devPkgs.enableFor.user.colin = true;
sane.programs."gnome.geary".config.autostart = true;
boot.loader.efi.canTouchEfiVariables = false;
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];

View File

@ -49,6 +49,7 @@
# sane.programs.ntfy-sh.config.autostart = true;
sane.programs.dino.config.autostart = true;
# sane.programs."gnome.geary".config.autostart = true;
# sane.programs.calls.config.autostart = true;
sane.programs.mpv.config.vo = "wlshm"; #< see hosts/common/programs/mpv.nix for details

View File

@ -3,9 +3,22 @@
# - 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
{
sane.programs."gnome.geary" = {
configOption = with lib; mkOption {
default = {};
type = types.submodule {
options.autostart = mkOption {
type = types.bool;
default = false;
};
};
};
persist.byStore.private = [
# attachments, and email -- contained in a sqlite db
".local/share/geary"
@ -51,5 +64,17 @@
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";
};
};
};
}

View File

@ -351,6 +351,13 @@ in
command = "${systemctl-toggle}/bin/systemctl-toggle --user gnome-calls";
active = "${pkgs.systemd}/bin/systemctl is-active --user gnome-calls";
}
] ++ lib.optionals config.sane.programs."gnome.geary".enabled [
{
type = "toggle";
label = "E"; # email (Geary); other icons: ✉, 📧
command = "${systemctl-toggle}/bin/systemctl-toggle --user geary";
active = "${pkgs.systemd}/bin/systemctl is-active --user geary";
}
] ++ lib.optionals config.sane.programs.dino.enabled [
{
type = "toggle";

View File

@ -146,6 +146,7 @@ for_window [title="megapixels"] inhibit_idle open
# TODO: could be neat to somehow do this in a way that it never steals focus from anything...
for_window [app_id="im.dino.Dino"] move container to workspace number 1
for_window [app_id="org.gnome.Fractal"] move container to workspace number 1
for_window [app_id="geary"] move container to workspace number 1
### displays
## DESKTOP