matrix-bot.nix: Fix dynamic user to static user
All checks were successful
buildbot/nix-build .#checks.x86_64-linux.clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-matrix-bot Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-default Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-ensure-tea-login Build done.
buildbot/nix-build .#checks.x86_64-linux.treefmt Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-create-pr Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-merge 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-job-flake-update-clan-core 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-gitea Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-flake-update Build done.
buildbot/nix-build .#checks.x86_64-linux.package-matrix-bot Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-web01 Build done.
buildbot/nix-eval Build done.
All checks were successful
buildbot/nix-build .#checks.x86_64-linux.clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-merge Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-matrix-bot Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-default Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-ensure-tea-login Build done.
buildbot/nix-build .#checks.x86_64-linux.treefmt Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-create-pr Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-merge 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-job-flake-update-clan-core 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-gitea Build done.
buildbot/nix-build .#checks.x86_64-linux.package-action-flake-update Build done.
buildbot/nix-build .#checks.x86_64-linux.package-matrix-bot Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-web01 Build done.
buildbot/nix-eval Build done.
This commit is contained in:
parent
b99cbbaa4c
commit
efe12541fe
@ -9,6 +9,15 @@ let
|
|||||||
name = "matrix-bot";
|
name = "matrix-bot";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
users.groups.matrix-bot-user = { };
|
||||||
|
users.users.matrix-bot-user = {
|
||||||
|
group = "matrix-bot-user";
|
||||||
|
isSystemUser = true;
|
||||||
|
description = "User for matrix-bot service";
|
||||||
|
home = "/var/lib/matrix-bot";
|
||||||
|
createHome = true;
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.${name} = {
|
systemd.services.${name} = {
|
||||||
path = [ self.packages.${pkgs.system}.matrix-bot ];
|
path = [ self.packages.${pkgs.system}.matrix-bot ];
|
||||||
description = "Matrix bot for changelog and reviews";
|
description = "Matrix bot for changelog and reviews";
|
||||||
@ -17,7 +26,7 @@ in
|
|||||||
environment = {
|
environment = {
|
||||||
MATRIX_PASSWORD_FILE = "%d/MATRIX_PASSWORD_FILE";
|
MATRIX_PASSWORD_FILE = "%d/MATRIX_PASSWORD_FILE";
|
||||||
OPENAI_API_KEY_FILE = "%d/OPENAI_API_KEY_FILE";
|
OPENAI_API_KEY_FILE = "%d/OPENAI_API_KEY_FILE";
|
||||||
HOME = "/run/${name}";
|
HOME = "/var/lib/${name}";
|
||||||
};
|
};
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
@ -25,9 +34,10 @@ in
|
|||||||
"MATRIX_PASSWORD_FILE:${config.sops.secrets.web01-matrix-password-clan-bot.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}"
|
"OPENAI_API_KEY_FILE:${config.sops.secrets.qubasas-openai-api-key.path}"
|
||||||
];
|
];
|
||||||
DynamicUser = true;
|
User = "matrix-bot-user";
|
||||||
RuntimeDirectory = "${name}";
|
Group = "matrix-bot-user";
|
||||||
WorkingDirectory = "/run/${name}";
|
WorkingDirectory = "/var/lib/${name}";
|
||||||
|
RuntimeDirectory = "/var/lib/${name}";
|
||||||
};
|
};
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
|
@ -175,10 +175,9 @@ Follow these guidelines:
|
|||||||
- Mention each scope and pull request number only once
|
- Mention each scope and pull request number only once
|
||||||
- Have these headers in the changelog if applicable:
|
- Have these headers in the changelog if applicable:
|
||||||
- New Features
|
- New Features
|
||||||
- Bug Fixes
|
|
||||||
- Refactoring
|
|
||||||
- Documentation
|
- Documentation
|
||||||
- Removed Features
|
- Refactoring
|
||||||
|
- Bug Fixes
|
||||||
- Other Changes
|
- Other Changes
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
|
Loading…
Reference in New Issue
Block a user