Add minecraft server status bot
This commit is contained in:
parent
9eca58e0a4
commit
5c1a303d77
|
@ -0,0 +1,16 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
systemd.services.mc-status-bot = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
description = "Minecraft server status bot for Matrix";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${
|
||||||
|
pkgs.callPackage ../pkgs/mc-status-bot.nix { }
|
||||||
|
}/bin/mc-status-bot.sh";
|
||||||
|
EnvironmentFile = "/var/lib/secrets/mc-status-bot-env";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs }:
|
||||||
|
with pkgs;
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "mc-status-bot";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://git.lain.faith/sorceress/e8-status-bot.git";
|
||||||
|
rev = "c35abf0aba0ca524bc1d3dab9576b41e2b319138";
|
||||||
|
hash = "sha256-sK0Azd/3ymk5Jsj/GYmNJvYh9fMXFozTuWZhKnYTGbs=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ curl jq ];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp run.sh $out/bin/mc-status-bot.sh
|
||||||
|
wrapProgram $out/bin/mc-status-bot.sh \
|
||||||
|
--prefix PATH : ${lib.makeBinPath buildInputs}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -147,6 +147,10 @@
|
||||||
keyCommand = [ "cat" "./secrets/hurricane-tokens" ];
|
keyCommand = [ "cat" "./secrets/hurricane-tokens" ];
|
||||||
destDir = "/var/lib/secrets/";
|
destDir = "/var/lib/secrets/";
|
||||||
};
|
};
|
||||||
|
"mc-status-bot-env" = {
|
||||||
|
keyCommand = [ "cat" "./secrets/mc-status-bot-env" ];
|
||||||
|
destDir = "/var/lib/secrets";
|
||||||
|
};
|
||||||
"fedi-data.toml" = {
|
"fedi-data.toml" = {
|
||||||
keyCommand = [ "cat" "./secrets/frq-friend-fedi-data.toml" ];
|
keyCommand = [ "cat" "./secrets/frq-friend-fedi-data.toml" ];
|
||||||
destDir = "/var/lib/frq-friend";
|
destDir = "/var/lib/frq-friend";
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
../../common/fragments/mastodon.nix
|
../../common/fragments/mastodon.nix
|
||||||
../../common/fragments/matrix-ril100.nix
|
../../common/fragments/matrix-ril100.nix
|
||||||
../../common/fragments/matterbridge.nix
|
../../common/fragments/matterbridge.nix
|
||||||
|
../../common/fragments/mc-status-bot.nix
|
||||||
../../common/fragments/minecraft.nix
|
../../common/fragments/minecraft.nix
|
||||||
../../common/fragments/nyandroid.nix
|
../../common/fragments/nyandroid.nix
|
||||||
../../common/fragments/postgres.nix
|
../../common/fragments/postgres.nix
|
||||||
|
|
Loading…
Reference in New Issue