mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
noti: add module
This commit is contained in:
parent
9f0fdc68a9
commit
3f34bf4465
3 changed files with 61 additions and 0 deletions
|
@ -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'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
53
modules/programs/noti.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue