From d3f58b279ec85c513ec302d1b2a19c72bdbcd7aa Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Wed, 7 Jun 2023 23:44:32 +0300 Subject: [PATCH] user/aerc: use unstable package --- flake.lock | 18 +++++++++--------- home/modules/mail/aerc.nix | 13 +++++++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index bcd1331..3a3af80 100644 --- a/flake.lock +++ b/flake.lock @@ -215,11 +215,11 @@ ] }, "locked": { - "lastModified": 1684824189, - "narHash": "sha256-k3nCkn5Qy67rCguuw6YkGuL6hOUNRKxQoKOjnapk5sU=", + "lastModified": 1686168915, + "narHash": "sha256-zV5lh3PGKcI8W7+5bXSRsCetfsi6x10Xvojpk5HAQHU=", "owner": "nix-community", "repo": "home-manager", - "rev": "58eb968c21d309a6c2b020ea8d64e25c38ceebba", + "rev": "cc6745b35fefe48624ebf573382e1e0e4a6fe85e", "type": "github" }, "original": { @@ -468,11 +468,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1684879512, - "narHash": "sha256-BoAOf19Dshtfu6BDPznrKO97oeCkXlYfa1Hyt0Qv8VU=", + "lastModified": 1686089707, + "narHash": "sha256-LTNlJcru2qJ0XhlhG9Acp5KyjB774Pza3tRH0pKIb3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e6e049b7a24decd1f0caee8b035913795697c699", + "rev": "af21c31b2a1ec5d361ed8050edd0303c31306397", "type": "github" }, "original": { @@ -484,11 +484,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1684782344, - "narHash": "sha256-SHN8hPYYSX0thDrMLMWPWYulK3YFgASOrCsIL3AJ78g=", + "lastModified": 1686059680, + "narHash": "sha256-sp0WlCIeVczzB0G8f8iyRg3IYW7KG31mI66z7HIZwrI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8966c43feba2c701ed624302b6a935f97bcbdf88", + "rev": "a558f7ac29f50c4b937fb5c102f587678ae1c9fb", "type": "github" }, "original": { diff --git a/home/modules/mail/aerc.nix b/home/modules/mail/aerc.nix index 02e759d..1263067 100644 --- a/home/modules/mail/aerc.nix +++ b/home/modules/mail/aerc.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let exec = cmd: ":${cmd}"; @@ -22,14 +22,14 @@ in # See: https://git.sbruder.de/simon/nixos-config/src/branch/master/users/simon/modules/mail/aerc/default.nix programs.aerc = { enable = true; - # See: https://man.archlinux.org/man/aerc-config.5.en + package = pkgs.unstable.aerc; + # https://git.sr.ht/~rjarry/aerc/tree/master/item/doc/aerc-config.5.scd extraConfig = { general = { unsafe-accounts-conf = true; }; ui = { - index-format = "%-17.17D %-20.20n %Z %-20.20g %s"; # See https://godoc.org/time#Time.Format timestamp-format = "2006-01-02 15:04 MST"; this-day-time-format = "15:04"; @@ -40,13 +40,14 @@ in border-char-horizontal = "─"; fuzzy-complete = true; new-message-bell = true; + index-columns = "date<20,from<30,flags>4,subject<*"; + column-from = "{{ .From | emails | join \", \" }}"; }; statusline = { display-mode = "icon"; }; - # https://git.sr.ht/~rjarry/aerc/tree/master/item/doc/aerc-config.5.scd filters = { ".headers" = "colorize"; "text/html" = "html | colorize"; @@ -55,6 +56,10 @@ in # "text/*" = "${pkgs.bat}/bin/bat -fpp --file-name='$AERC_FILENAME'"; "message/delivery-status" = "cat | colorize"; }; + + hooks = { + mail-received = "notify-send \"New mail from $AERC_FROM_NAME\" \"$AERC_SUBJECT\""; + }; }; extraBinds = { messages = lib.mkMerge [