fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . noti ; 8 9in { 10meta . maintainers = [ ]; 11 12options . programs . noti = { 13enable = mkEnableOption "Noti" ; 14 15settings = mkOption { 16type = types . attrsOf ( types . attrsOf types . str ); 17default = { }; 18description = '' 19Configuration written to 20{file}`$XDG_CONFIG_HOME/noti/noti.yaml`. 21 22See 23{manpage}`noti.yaml(5)`. 24for the full list of options. 25'' ; 26example = literalExpression '' 27{ 28say = { 29voice = "Alex"; 30}; 31slack = { 32token = "1234567890abcdefg"; 33channel = "@jaime"; 34}; 35} 36'' ; 37}; 38}; 39 40config = mkIf cfg . enable { 41home . packages = [ pkgs . noti ]; 42 43xdg . configFile . "noti/noti.yaml" = 44mkIf ( cfg . settings != { }) { text = generators . toYAML { } cfg . settings ; }; 45}; 46 47}