summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-01-11 20:25:56 +0100
committerlassulus <lassulus@lassul.us>2020-01-11 20:25:56 +0100
commitb9bebf55f9e25d1624dd1e9bf897f50ef62c5ee7 (patch)
tree45f8f20309ab67b11bdb6179db320d1904c95dbc
parentc9df2a58d2492567872a6e69115b5b01ee4feeb9 (diff)
hidden-ssh: make channel & server configurable
-rw-r--r--krebs/3modules/hidden-ssh.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/krebs/3modules/hidden-ssh.nix b/krebs/3modules/hidden-ssh.nix
index 304049b4e..2d697e497 100644
--- a/krebs/3modules/hidden-ssh.nix
+++ b/krebs/3modules/hidden-ssh.nix
@@ -11,6 +11,14 @@ let
api = {
enable = mkEnableOption "hidden SSH announce";
+ channel = mkOption {
+ type = types.str;
+ default = "#krebs-announce";
+ };
+ server = mkOption {
+ type = types.str;
+ default = "irc.freenode.org";
+ };
};
imp = let
@@ -38,10 +46,10 @@ let
echo "still waiting for ${hiddenServiceDir}/hostname"
sleep 1
done
- ${pkgs.untilport}/bin/untilport irc.freenode.org 6667 && \
+ ${pkgs.untilport}/bin/untilport ${cfg.server} 6667 && \
${pkgs.irc-announce}/bin/irc-announce \
- irc.freenode.org 6667 ${config.krebs.build.host.name}-ssh \
- \#krebs-announce \
+ ${cfg.server} 6667 ${config.krebs.build.host.name}-ssh \
+ \${cfg.channel} \
"SSH Hidden Service at $(cat ${hiddenServiceDir}/hostname)"
'';
PrivateTmp = "true";