added signalbot servec account

This commit is contained in:
2026-03-10 08:15:04 -04:00
parent 663833d4fa
commit 5b054dfc8f
4 changed files with 29 additions and 6 deletions

View File

@@ -6,11 +6,13 @@
{
networking.firewall.allowedTCPPorts = [ 8001 ];
users.users.vaninventory = {
isSystemUser = true;
group = "vaninventory";
users = {
users.vaninventory = {
isSystemUser = true;
group = "vaninventory";
};
groups.vaninventory = { };
};
users.groups.vaninventory = { };
systemd.services.van_inventory = {
description = "Van Inventory API";

View File

@@ -30,11 +30,14 @@ in
local hass hass trust
local gitea gitea trust
# signalbot
local richie signalbot trust
# math
local postgres math trust
host postgres math 127.0.0.1/32 trust
host postgres math ::1/128 trust
host postgres math 192.168.90.1/24 trust
host postgres math ::1/128 trust
host postgres math 192.168.90.1/24 trust
'';
@@ -98,6 +101,12 @@ in
replication = true;
};
}
{
name = "signalbot";
ensureClauses = {
login = true;
};
}
];
ensureDatabases = [
"hass"

View File

@@ -7,6 +7,14 @@ let
vars = import ../vars.nix;
in
{
users = {
users.signalbot = {
isSystemUser = true;
group = "signalbot";
};
groups.signalbot = { };
};
systemd.services.signal-bot = {
description = "Signal command and control bot";
after = [
@@ -22,6 +30,8 @@ in
serviceConfig = {
Type = "simple";
User = "signalbot";
Group = "signalbot";
EnvironmentFile = "${vars.secrets}/services/signal-bot";
ExecStart = "${pkgs.my_python}/bin/python -m python.signal_bot.main";
StateDirectory = "signal-bot";