summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/hidden-ssh.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-01-14 21:35:10 +0100
committertv <tv@krebsco.de>2020-01-14 21:35:10 +0100
commit67cda2940f1228063efd09e08d39fad12fe9a0ef (patch)
treeac639d44c2e6378265621988b19c345d891c4909 /krebs/3modules/hidden-ssh.nix
parent525c955b5f955dd23ec4d060ebd1ef1e149760ce (diff)
parenta01e3174e04fc946e7dfaf3569919aacf5a6763d (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/3modules/hidden-ssh.nix')
-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";