From 63dfc72aa61a2b41657826a11e5f364ac1421dd9 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 25 Dec 2020 23:46:40 +0300 Subject: [PATCH] Switch to geary --- modules/applications.nix | 4 +- modules/applications/geary.nix | 67 ++++++++++++++++++++++++++++++ modules/default.nix | 2 +- modules/workspace/sway/default.nix | 7 ++-- 4 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 modules/applications/geary.nix diff --git a/modules/applications.nix b/modules/applications.nix index 323a638..1f4534f 100755 --- a/modules/applications.nix +++ b/modules/applications.nix @@ -31,8 +31,8 @@ with import ../support.nix { inherit lib config; }; { desktop = "org.gnome.FileRoller"; }; mail = { - cmd = "${pkgs.sylpheed}/bin/sylpheed"; - desktop = "sylpheed"; + cmd = "${pkgs.gnome3.geary}/bin/geary"; + desktop = "org.gnome.Geary"; }; text_processor = { cmd = "${pkgs.abiword}/bin/abiword"; diff --git a/modules/applications/geary.nix b/modules/applications/geary.nix new file mode 100644 index 0000000..1ab4e0c --- /dev/null +++ b/modules/applications/geary.nix @@ -0,0 +1,67 @@ +{ config, pkgs, lib, ... }: +let + gearyConfig = { + Account = { + label = ""; + ordinal = 6; + prefetch_days = 30; + save_drafts = true; + save_sent = true; + sender_mailboxes = "Alexander Bantyev ;"; + service_provider = "other"; + signature = builtins.replaceStrings ["\n"] ["\\n"] '' + -- + Александр Бантьев /Alexander Bantyev/ aka balsoft + + Nix DevOPS/SRE at serokell.io + + + + + matrix://@balsoft:balsoft.ru + (https://matrix.to/#/@balsoft:balsoft.ru) + https://t.me/balsoft + https://github.com/balsoft + ''; + use_signature = true; + }; + Folders = { + archive_folder = "Archive;"; + drafts_folder = ""; + junk_folder = ""; + sent_folder = ""; + trash_folder = ""; + }; + Incoming = { + credentials = "custom"; + host = "balsoft.ru"; + login = "balsoft@balsoft.ru"; + port = 993; + remember_password = true; + transport_security = "transport"; + }; + Metadata = { + status = "enabled"; + version = 1; + }; + Outgoing = { + credentials = "use-incoming"; + host = "balsoft.ru"; + port = 587; + remember_password = true; + transport_security = "start-tls"; + }; + }; +in { + programs.geary.enable = true; + home-manager.users.balsoft = { + xdg.configFile."geary/user-style.css".text = '' + *, html, body, body.plain div, body.plain a, body.plain p, body.plain span { + background: ${config.themes.colors .bg} !important; + color: ${config.themes.colors.fg} !important; + font: 16px 'IBM Plex Mono', monospace; + } + ''; + xdg.configFile."geary/account_03/geary.ini".text = lib.generators.toGitINI gearyConfig; + }; +} diff --git a/modules/default.nix b/modules/default.nix index 534e144..0989489 100755 --- a/modules/default.nix +++ b/modules/default.nix @@ -4,7 +4,7 @@ device: ./applications/packages.nix ./applications/emacs ./applications/alacritty.nix - ./applications/sylpheed.nix + ./applications/geary.nix ./applications/weechat.nix ./applications/okular.nix ./applications/yt-utilities.nix diff --git a/modules/workspace/sway/default.nix b/modules/workspace/sway/default.nix index 7c30e87..e212d57 100755 --- a/modules/workspace/sway/default.nix +++ b/modules/workspace/sway/default.nix @@ -24,7 +24,7 @@ in { ]; "" = [ { app_id = "org.kde.trojita"; } - { title = ".* - Sylpheed.*"; } + { title = ".*.Geary*"; } { title = "balsoft : weechat.*"; } { title = "Spectral"; } { title = "Slack"; } @@ -78,7 +78,9 @@ in { ]; }; startup = [ - { command = "${apps.browser.cmd}"; } + { command = apps.browser.cmd; } + { command = apps.mail.cmd; } + { command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; @@ -87,7 +89,6 @@ in { command = "${pkgs.keepassxc}/bin/keepassxc /home/balsoft/projects/nixos-config/misc/Passwords.kdbx"; } - { command = "${pkgs.termNote}/bin/noted"; } { command = "${pkgs.spectral}/bin/spectral"; } { command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; }