home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the top-level directory.
This commit is contained in:
parent
c856933803
commit
65a8f7c481
119 changed files with 2 additions and 2 deletions
23
modules/home/mail/himalaya/default.nix
Normal file
23
modules/home/mail/himalaya/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ 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 = lib.getExe pkgs.libnotify;
|
||||
in
|
||||
pkgs.writeScript "mail-notifier" ''
|
||||
SENDER="$1"
|
||||
SUBJECT="$2"
|
||||
${notify-send} \
|
||||
-c himalaya \
|
||||
-- "$(printf 'Received email from %s\n\n%s' "$SENDER" "$SUBJECT")"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue