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 {
|
2023-06-22 10:16:28 +02:00
|
|
|
meta.maintainers = [ ];
|
2018-09-19 16:00:00 +02:00
|
|
|
|
|
|
|
options.programs.noti = {
|
2023-07-02 01:45:18 +02:00
|
|
|
enable = mkEnableOption "Noti";
|
2018-09-19 16:00:00 +02:00
|
|
|
|
|
|
|
settings = mkOption {
|
|
|
|
type = types.attrsOf (types.attrsOf types.str);
|
2020-02-02 00:39:17 +01:00
|
|
|
default = { };
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2018-09-19 16:00:00 +02:00
|
|
|
Configuration written to
|
2023-07-01 01:30:13 +02:00
|
|
|
{file}`$XDG_CONFIG_HOME/noti/noti.yaml`.
|
|
|
|
|
2018-09-19 16:00:00 +02:00
|
|
|
See
|
2023-07-01 01:30:13 +02:00
|
|
|
{manpage}`noti.yaml(5)`.
|
2018-09-19 16:00:00 +02:00
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|