1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-22 22:48:31 +02:00

noti: add module

This commit is contained in:
Mario Rodas 2018-09-19 09:00:00 -05:00 committed by Robert Helgesson
parent 9f0fdc68a9
commit 3f34bf4465
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
3 changed files with 61 additions and 0 deletions

View File

@ -793,6 +793,13 @@ in
A new module is available: 'programs.zathura'.
'';
}
{
time = "2018-09-20T19:26:40+00:00";
message = ''
A new module is available: 'programs.noti'.
'';
}
];
};
}

View File

@ -48,6 +48,7 @@ let
./programs/msmtp.nix
./programs/neovim.nix
./programs/newsboat.nix
./programs/noti.nix
./programs/notmuch.nix
./programs/offlineimap.nix
./programs/pidgin.nix

53
modules/programs/noti.nix Normal file
View File

@ -0,0 +1,53 @@
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.programs.noti;
in
{
meta.maintainers = [ maintainers.marsam ];
options.programs.noti = {
enable = mkEnableOption "Noti";
settings = mkOption {
type = types.attrsOf (types.attrsOf types.str);
default = {};
description = ''
Configuration written to
<filename>~/.config/noti/noti.yaml</filename>.
</para><para>
See
<citerefentry>
<refentrytitle>noti.yaml</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>.
for the full list of options.
'';
example = literalExample ''
{
say = {
voice = "Alex";
};
slack = {
token = "1234567890abcdefg";
channel = "@jaime";
};
}
'';
};
};
config = mkIf cfg.enable {
home.packages = [ pkgs.noti ];
xdg.configFile."noti/noti.yaml" = mkIf (cfg.settings != {}) {
text = generators.toYAML {} cfg.settings;
};
};
}