matrix-bot: Fix incorrect env var name
All checks were successful
buildbot/nix-build .#checks.x86_64-linux.clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-flake-update Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.package-job-flake-update-clan-core Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-matrix-bot Build done.
buildbot/nix-build .#checks.x86_64-linux.package-matrix-bot Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-default Build done.
buildbot/nix-eval Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.treefmt Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gitea Build done.
buildbot/nix-build .#checks.x86_64-linux.package-job-flake-update-clan-homepage Build done.
buildbot/nix-build .#checks.x86_64-linux.package-job-flake-update-clan-infra Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-flake-update-pr-clan Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-create-pr Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-ensure-tea-login Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-web01 Build done.

This commit is contained in:
Luis Hebendanz 2024-07-03 18:05:51 +02:00
parent ed2d910832
commit b663547364
4 changed files with 11 additions and 8 deletions

View File

@ -15,15 +15,15 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = {
MATRIX_PASSWORD = "%d/MATRIX_PASSWORD";
OPENAI_API_KEY = "%d/OPENAI_API_KEY";
MATRIX_PASSWORD_FILE = "%d/MATRIX_PASSWORD_FILE";
OPENAI_API_KEY_FILE = "%d/OPENAI_API_KEY_FILE";
HOME = "/run/${name}";
};
serviceConfig = {
LoadCredential = [
"MATRIX_PASSWORD:${config.sops.secrets.web01-matrix-password-clan-bot.path}"
"OPENAI_API_KEY:${config.sops.secrets.qubasas-openai-api-key.path}"
"MATRIX_PASSWORD_FILE:${config.sops.secrets.web01-matrix-password-clan-bot.path}"
"OPENAI_API_KEY_FILE:${config.sops.secrets.qubasas-openai-api-key.path}"
];
DynamicUser = true;
RuntimeDirectory = "${name}";

View File

@ -5,6 +5,7 @@
aiofiles,
aiohttp,
markdown2,
git,
...
}:
@ -17,7 +18,7 @@ let
markdown2
];
runtimeDependencies = [ ];
runtimeDependencies = [ git ];
testDependencies = pythonDependencies ++ runtimeDependencies ++ [ ];
in
@ -28,7 +29,7 @@ python3.pkgs.buildPythonApplication {
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = pythonDependencies;
propagatedBuildInputs = pythonDependencies ++ runtimeDependencies;
passthru.testDependencies = testDependencies;

View File

@ -119,9 +119,9 @@ def create_parser(prog: str | None = None) -> argparse.ArgumentParser:
def matrix_password() -> str:
matrix_password_file = environ.get("MATRIX_PASSWORD", default=None)
matrix_password_file = environ.get("MATRIX_PASSWORD_FILE", default=None)
if matrix_password_file is None:
raise Exception("MATRIX_PASSWORD environment variable is not set")
raise Exception("MATRIX_PASSWORD_FILE environment variable is not set")
with open(matrix_password_file) as f:
return f.read().strip()

View File

@ -168,6 +168,8 @@ Ensure the following:
- Discard uninteresting changes
- Keep the summary as brief as possible
- Use present tense
- Our commit messages are in the format: "scope: message". For example: "changelog: Add a new feature"
- Only ever mention the same feature once
The changelog is as follows:
---
"""