1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

3 Commits

6 changed files with 51 additions and 1 deletions

6
.gitmodules vendored
View File

@@ -0,0 +1,6 @@
[submodule "submodules/menstruation-telegram"]
path = submodules/menstruation-telegram
url = https://github.com/kmein/menstruation-telegram
[submodule "submodules/menstruation-backend"]
path = submodules/menstruation-backend
url = https://github.com/kmein/menstruation.rs

41
configs/menstruation.nix Normal file
View File

@@ -0,0 +1,41 @@
{ pkgs, lib, ... }:
let
backend = pkgs.callPackage <niveum/submodules/menstruation-backend> {};
telegram = pkgs.callPackage <niveum/submodules/menstruation-telegram> {};
backendPort = 8000;
in
{
containers.menstruation.autoStart = true;
containers.menstruation.config = { config, pkgs, ... }: {
services.redis.enable = true;
systemd.services.menstruation-telegram = {
wants = [
"network-online.target"
"menstruation-backend.service"
"redis.service"
];
wantedBy = [ "multi-user.target" ];
environment = {
MENSTRUATION_TOKEN = lib.strings.fileContents <system-secrets/telegram/menstruation.token>;
MENSTRUATION_ENDPOINT = "http://localhost:${toString backendPort}";
MENSTRUATION_MODERATORS = "18980945";
};
serviceConfig = {
Restart = "always";
DynamicUser = true;
ExecStart = "${telegram}/bin/menstruation-telegram";
};
};
systemd.services.menstruation-backend = {
wants = [ "network-online.target" ];
environment.ROCKET_PORT = toString backendPort;
serviceConfig = {
Restart = "always";
DynamicUser = true;
ExecStart = "${backend}/bin/menstruation_server";
};
};
};
}

View File

@@ -119,7 +119,7 @@ in
See on <a href="http://${config.services.grafana.domain}/d/alpUteInz/niveum">Grafana</a>.
{{ else -}}
😌 <del>{{ index .Annotations "summary"}}</del>
RESOLVED 😌 <del>{{ index .Annotations "summary"}}</del>
{{- end }}
{{end -}}
{{end}}

View File

@@ -59,6 +59,7 @@ in
<niveum/configs/radio>
<niveum/configs/gitea.nix>
<niveum/configs/names.nix>
<niveum/configs/menstruation.nix>
<niveum/configs/telegram-bots>
<niveum/configs/weechat.nix>
<niveum/configs/urlwatch.nix>