feat(mottarone): add glpi-agent

This commit is contained in:
uku 2025-01-29 16:08:18 +01:00
parent fd57aa3657
commit 385264fff4
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
2 changed files with 23 additions and 0 deletions

View file

@ -9,6 +9,7 @@ let
in
{
imports = [
./glpi-agent.nix
./urbackup.nix
];

View file

@ -0,0 +1,22 @@
{ lib, pkgs, ... }:
{
environment.systemPackages = [ pkgs.glpi-agent ];
systemd.services."glpi-agent" = {
description = "GLPI agent";
after = [
"syslog.target"
"network.target"
];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${lib.getExe pkgs.glpi-agent} --conf-file /etc/glpi-agent/agent.cfg --vardir /var/lib/glpi-agent --daemon --no-fork";
ExecReload = "kill -HUP $MAINPID";
CapabilityBoundingSet = "~CAP_SYS_PTRACE";
StateDirectory = "glpi-agent";
WorkingDirectory = "/var/lib/glpi-agent";
};
};
}