mirror of
https://github.com/kmein/niveum
synced 2026-03-19 19:41:08 +01:00
Compare commits
3 Commits
b989684f12
...
ac54cd5eaf
| Author | SHA1 | Date | |
|---|---|---|---|
| ac54cd5eaf | |||
| 4bd5965915 | |||
| f21112465b |
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -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
41
configs/menstruation.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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}}
|
||||
|
||||
1
submodules/menstruation-backend
Submodule
1
submodules/menstruation-backend
Submodule
Submodule submodules/menstruation-backend added at dd405fe2ac
1
submodules/menstruation-telegram
Submodule
1
submodules/menstruation-telegram
Submodule
Submodule submodules/menstruation-telegram added at d941ccb4c1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user