fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6cfg = config . programs . senpai ; 7cfgFmt = pkgs . formats . yaml { }; 8in { 9options . programs . senpai = { 10enable = mkEnableOption "senpai" ; 11package = mkOption { 12type = types . package ; 13default = pkgs . senpai ; 14defaultText = literalExpression "pkgs.senpai" ; 15description = "The `senpai` package to use." ; 16}; 17config = mkOption { 18type = types . submodule { 19freeformType = cfgFmt . type ; 20options = { 21addr = mkOption { 22type = types . str ; 23description = '' 24The address (host[:port]) of the IRC server. senpai uses TLS 25connections by default unless you specify no-tls option. TLS 26connections default to port 6697, plain-text use port 6667. 27'' ; 28}; 29nick = mkOption { 30type = types . str ; 31description = '' 32Your nickname, sent with a NICK IRC message. It mustn't contain 33spaces or colons (:). 34'' ; 35}; 36password = mkOption { 37type = types . nullOr types . str ; 38default = null ; 39description = '' 40Your password, used for SASL authentication. Note that it will 41reside world-readable in the Nix store. 42'' ; 43}; 44no-tls = mkOption { 45type = types . bool ; 46default = false ; 47description = "Disables TLS encryption." ; 48}; 49}; 50}; 51example = literalExpression '' 52{ 53addr = "libera.chat:6697"; 54nick = "nicholas"; 55password = "verysecurepassword"; 56} 57'' ; 58description = '' 59Configuration for senpai. For a complete list of options, see 60{manpage}`senpai(5)`. 61'' ; 62}; 63}; 64 65config = mkIf cfg . enable { 66home . packages = [ cfg . package ]; 67xdg . configFile . "senpai/senpai.yaml" . source = 68cfgFmt . generate "senpai.yaml" cfg . config ; 69}; 70 71meta . maintainers = [ hm . maintainers . malvo ]; 72}