hidden-ssh: make channel & server configurable
This commit is contained in:
parent
c9df2a58d2
commit
b9bebf55f9
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user