Use specific mail-robot group to send mail

Allows any user to be able to send mail from the robot account as long
as it is added to the mail-robot group.

Reviewed-by: Aleix Boné <abonerib@bsc.es>
This commit is contained in:
Rodrigo Arias 2025-10-27 12:54:20 +01:00
parent a7018250ca
commit a294daf7e3
2 changed files with 7 additions and 1 deletions

View File

@ -29,6 +29,9 @@
}; };
}; };
# Allow gitea user to send mail
users.users.gitea.extraGroups = [ "mail-robot" ];
services.gitea-actions-runner.instances = { services.gitea-actions-runner.instances = {
runrun = { runrun = {
enable = true; enable = true;

View File

@ -1,8 +1,11 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
# Robot user that can see the password to send mail from jungle-robot
users.groups.mail-robot = {};
age.secrets.jungleRobotPassword = { age.secrets.jungleRobotPassword = {
file = ../../secrets/jungle-robot-password.age; file = ../../secrets/jungle-robot-password.age;
group = "gitea"; group = "mail-robot";
mode = "440"; mode = "440";
}; };