Merge pull request #245759 from mweinelt/frigate-recordings

nixos/frigate: fix recording and serving of clips/recordings
This commit is contained in:
Martin Weinelt 2023-07-28 12:02:29 +02:00 committed by GitHub
commit de5ca86149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,6 +322,16 @@ in
'';
};
systemd.services.nginx.serviceConfig.SupplementaryGroups = [
"frigate"
];
users.users.frigate = {
isSystemUser = true;
group = "frigate";
};
users.groups.frigate = {};
systemd.services.frigate = {
after = [
"go2rtc.service"
@ -349,15 +359,18 @@ in
serviceConfig = {
ExecStart = "${cfg.package.python.interpreter} -m frigate";
DynamicUser = true;
User = "frigate";
Group = "frigate";
UMask = "0027";
StateDirectory = "frigate";
UMask = "0077";
StateDirectoryMode = "0750";
# Caches
PrivateTmp = true;
CacheDirectory = "frigate";
CacheDirectoryMode = "0750";
BindPaths = [
"/migrations:${cfg.package}/share/frigate/migrations:ro"