feat(ops/panettone): Add configuration for irccat
Adds configuration options for the (inconsistently named) environment variables that configure irccat integration with Panettone. The defaults match the irccat setup on whitby. Change-Id: I6857512a2e3f29f16777493eb981cc69ce3c045f Reviewed-on: https://cl.tvl.fyi/c/depot/+/2080 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com>
This commit is contained in:
parent
b1f2c2f48e
commit
77097f8056
2 changed files with 21 additions and 0 deletions
|
@ -38,6 +38,23 @@ in {
|
|||
'';
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
irccatHost = mkOption {
|
||||
description = "Hostname for the irccat instance";
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
};
|
||||
|
||||
irccatPort = mkOption {
|
||||
description = "Port for the irccat instance";
|
||||
type = types.int;
|
||||
default = 4722;
|
||||
};
|
||||
|
||||
irccatChannel = mkOption {
|
||||
description = "IRC channels to post to via irccat";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -78,6 +95,9 @@ in {
|
|||
PGHOST = "localhost";
|
||||
PGUSER = cfg.dbUser;
|
||||
PGDATABASE = cfg.dbName;
|
||||
IRCCATHOST = cfg.irccatHost;
|
||||
IRCCATPORT = toString cfg.irccatPort;
|
||||
ISSUECHANNEL = cfg.irccatChannel;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -236,6 +236,7 @@ in lib.fix(self: {
|
|||
dbUser = "panettone";
|
||||
dbName = "panettone";
|
||||
secretsFile = "/etc/secrets/panettone";
|
||||
irccatChannel = "##tvl,##tvl-dev";
|
||||
};
|
||||
|
||||
# Run the first cursed bot (quote bot)
|
||||
|
|
Loading…
Reference in a new issue