summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/hidden-ssh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules/hidden-ssh.nix')
-rw-r--r--krebs/3modules/hidden-ssh.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/krebs/3modules/hidden-ssh.nix b/krebs/3modules/hidden-ssh.nix
index 304049b4..f497de45 100644
--- a/krebs/3modules/hidden-ssh.nix
+++ b/krebs/3modules/hidden-ssh.nix
@@ -11,6 +11,18 @@ let
api = {
enable = mkEnableOption "hidden SSH announce";
+ channel = mkOption {
+ type = types.str;
+ default = "#krebs-announce";
+ };
+ server = mkOption {
+ type = types.str;
+ default = "irc.freenode.org";
+ };
+ message = mkOption {
+ type = types.str;
+ default = "SSH Hidden Service at ";
+ };
};
imp = let
@@ -38,11 +50,11 @@ 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 \
- "SSH Hidden Service at $(cat ${hiddenServiceDir}/hostname)"
+ ${cfg.server} 6667 ${config.krebs.build.host.name}-ssh \
+ \${cfg.channel} \
+ "${cfg.message}$(cat ${hiddenServiceDir}/hostname)"
'';
PrivateTmp = "true";
User = "tor";