hidden-ssh: make channel & server configurable

This commit is contained in:
lassulus 2020-01-11 20:25:56 +01:00
parent c9df2a58d2
commit b9bebf55f9

View File

@ -11,6 +11,14 @@ let
api = { api = {
enable = mkEnableOption "hidden SSH announce"; enable = mkEnableOption "hidden SSH announce";
channel = mkOption {
type = types.str;
default = "#krebs-announce";
};
server = mkOption {
type = types.str;
default = "irc.freenode.org";
};
}; };
imp = let imp = let
@ -38,10 +46,10 @@ let
echo "still waiting for ${hiddenServiceDir}/hostname" echo "still waiting for ${hiddenServiceDir}/hostname"
sleep 1 sleep 1
done done
${pkgs.untilport}/bin/untilport irc.freenode.org 6667 && \ ${pkgs.untilport}/bin/untilport ${cfg.server} 6667 && \
${pkgs.irc-announce}/bin/irc-announce \ ${pkgs.irc-announce}/bin/irc-announce \
irc.freenode.org 6667 ${config.krebs.build.host.name}-ssh \ ${cfg.server} 6667 ${config.krebs.build.host.name}-ssh \
\#krebs-announce \ \${cfg.channel} \
"SSH Hidden Service at $(cat ${hiddenServiceDir}/hostname)" "SSH Hidden Service at $(cat ${hiddenServiceDir}/hostname)"
''; '';
PrivateTmp = "true"; PrivateTmp = "true";