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

@@ -256,6 +256,7 @@
"sessionmaker", "sessionmaker",
"sessionstore", "sessionstore",
"shellcheck", "shellcheck",
"signalbot",
"signon", "signon",
"Signons", "Signons",
"skia", "skia",
@@ -305,6 +306,7 @@
"useragent", "useragent",
"usernamehw", "usernamehw",
"userprefs", "userprefs",
"vaninventory",
"vfat", "vfat",
"victron", "victron",
"virt", "virt",

View File

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

View File

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

View File

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