diff options
Diffstat (limited to 'home-manager/modules/programs/noti.nix')
-rw-r--r-- | home-manager/modules/programs/noti.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/home-manager/modules/programs/noti.nix b/home-manager/modules/programs/noti.nix new file mode 100644 index 00000000000..348555eef51 --- /dev/null +++ b/home-manager/modules/programs/noti.nix @@ -0,0 +1,50 @@ +{ 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; }; + }; + +} |