hemres permission service
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -81,7 +80,18 @@
|
|||||||
8642
|
8642
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.hermes-dashboard = {
|
systemd = {
|
||||||
|
paths.hermes-perms-watch = {
|
||||||
|
description = "Watch hermes data dir for permission changes";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
pathConfig = {
|
||||||
|
PathChanged = "/var/lib/hermes/.hermes";
|
||||||
|
Unit = "hermes-perms-fix.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
hermes-dashboard = {
|
||||||
description = "Hermes Agent Web Dashboard";
|
description = "Hermes Agent Web Dashboard";
|
||||||
after = [ "hermes-agent.service" ];
|
after = [ "hermes-agent.service" ];
|
||||||
bindsTo = [ "hermes-agent.service" ];
|
bindsTo = [ "hermes-agent.service" ];
|
||||||
@@ -95,4 +105,14 @@
|
|||||||
StartLimitBurst = 3;
|
StartLimitBurst = 3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hermes-perms-fix = {
|
||||||
|
description = "Fix hermes data dir permissions";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.coreutils}/bin/chmod 770 -R /var/lib/hermes/.hermes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user