Merge pull request #245759 from mweinelt/frigate-recordings

nixos/frigate: fix recording and serving of clips/recordings

authored by Martin Weinelt and committed by GitHub de5ca861 2465d7bc

+15 -2
+15 -2
nixos/modules/services/video/frigate.nix
··· 322 ''; 323 }; 324 325 systemd.services.frigate = { 326 after = [ 327 "go2rtc.service" ··· 349 serviceConfig = { 350 ExecStart = "${cfg.package.python.interpreter} -m frigate"; 351 352 - DynamicUser = true; 353 User = "frigate"; 354 355 StateDirectory = "frigate"; 356 - UMask = "0077"; 357 358 # Caches 359 PrivateTmp = true; 360 CacheDirectory = "frigate"; 361 362 BindPaths = [ 363 "/migrations:${cfg.package}/share/frigate/migrations:ro"
··· 322 ''; 323 }; 324 325 + systemd.services.nginx.serviceConfig.SupplementaryGroups = [ 326 + "frigate" 327 + ]; 328 + 329 + users.users.frigate = { 330 + isSystemUser = true; 331 + group = "frigate"; 332 + }; 333 + users.groups.frigate = {}; 334 + 335 systemd.services.frigate = { 336 after = [ 337 "go2rtc.service" ··· 359 serviceConfig = { 360 ExecStart = "${cfg.package.python.interpreter} -m frigate"; 361 362 User = "frigate"; 363 + Group = "frigate"; 364 + 365 + UMask = "0027"; 366 367 StateDirectory = "frigate"; 368 + StateDirectoryMode = "0750"; 369 370 # Caches 371 PrivateTmp = true; 372 CacheDirectory = "frigate"; 373 + CacheDirectoryMode = "0750"; 374 375 BindPaths = [ 376 "/migrations:${cfg.package}/share/frigate/migrations:ro"