2020-02-02 00:39:17 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2018-09-19 16:00:00 +02:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.noti;
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
in {
|
2018-09-19 16:00:00 +02:00
|
|
|
meta.maintainers = [ maintainers.marsam ];
|
|
|
|
|
|
|
|
options.programs.noti = {
|
|
|
|
enable = mkEnableOption "Noti";
|
|
|
|
|
|
|
|
settings = mkOption {
|
|
|
|
type = types.attrsOf (types.attrsOf types.str);
|
2020-02-02 00:39:17 +01:00
|
|
|
default = { };
|
2018-09-19 16:00:00 +02:00
|
|
|
description = ''
|
|
|
|
Configuration written to
|
2021-12-09 04:02:00 +01:00
|
|
|
<filename>$XDG_CONFIG_HOME/noti/noti.yaml</filename>.
|
2018-09-19 16:00:00 +02:00
|
|
|
</para><para>
|
|
|
|
See
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>noti.yaml</refentrytitle>
|
|
|
|
<manvolnum>5</manvolnum>
|
|
|
|
</citerefentry>.
|
|
|
|
for the full list of options.
|
|
|
|
'';
|
2021-10-09 11:14:08 +02:00
|
|
|
example = literalExpression ''
|
2018-09-19 16:00:00 +02:00
|
|
|
{
|
|
|
|
say = {
|
|
|
|
voice = "Alex";
|
|
|
|
};
|
|
|
|
slack = {
|
|
|
|
token = "1234567890abcdefg";
|
|
|
|
channel = "@jaime";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [ pkgs.noti ];
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
xdg.configFile."noti/noti.yaml" =
|
|
|
|
mkIf (cfg.settings != { }) { text = generators.toYAML { } cfg.settings; };
|
2018-09-19 16:00:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|