mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-27 09:19:09 -04:00
adding nornsight
This commit is contained in:
35
systems/rhapsody-in-green/agent_logger.nix
Normal file
35
systems/rhapsody-in-green/agent_logger.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
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}" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user