29 lines
551 B
Nix
29 lines
551 B
Nix
{
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
vars = import ../vars.nix;
|
|
in
|
|
{
|
|
services.plex = {
|
|
enable = true;
|
|
dataDir = vars.primary_plex;
|
|
};
|
|
systemd.services.plex_permission = {
|
|
description = "maintains plex permissions";
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = "${pkgs.bash}/bin/bash ${./plex_permission.sh}";
|
|
};
|
|
};
|
|
systemd.timers.plex_permission = {
|
|
wantedBy = [ "timers.target" ];
|
|
timerConfig = {
|
|
OnBootSec = "1h";
|
|
OnCalendar = "daily 03:00";
|
|
Unit = "plex_permission.service";
|
|
};
|
|
};
|
|
}
|