nix-config/home/mail/himalaya.nix
Bruno BELANYI ff8e64d601 home: mail: add himalaya
This mail client is very KISS. I like it.
2021-06-30 20:08:06 +02:00

24 lines
513 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.my.home.mail.himalaya;
in
{
config.programs.himalaya = lib.mkIf cfg.enable {
enable = true;
settings = {
notify-cmd =
let
notify-send = "${pkgs.libnotify}/bin/notify-send";
in
pkgs.writeScript "mail-notifier" ''
SENDER="$1"
SUBJECT="$2"
${notify-send} \
-c himalaya \
-- "$(printf 'Received email from %s\n\n%s' "$SENDER" "$SUBJECT")"
'';
};
};
}