mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-27 01:09:10 -04:00
36 lines
868 B
Nix
36 lines
868 B
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
{
|
|
systemd.services.agent-logger = {
|
|
description = "Unified agent logger";
|
|
after = [ "local-fs.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
environment = {
|
|
AGENT_LOG_DB = "/var/lib/agent-logger/agent_log.sqlite";
|
|
HOME = "/home/richie";
|
|
PYTHONPATH = "${inputs.self}";
|
|
};
|
|
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
User = "richie";
|
|
WorkingDirectory = "/home/richie";
|
|
ExecStart = "${pkgs.my_python}/bin/python -m python.agent_logger.main";
|
|
StateDirectory = "agent-logger";
|
|
Restart = "on-failure";
|
|
RestartSec = "5s";
|
|
StandardOutput = "journal";
|
|
StandardError = "journal";
|
|
NoNewPrivileges = true;
|
|
ProtectSystem = "strict";
|
|
ProtectHome = "read-only";
|
|
PrivateTmp = true;
|
|
ReadOnlyPaths = [ "${inputs.self}" ];
|
|
};
|
|
};
|
|
}
|