add various plex/arr services, remove nix-serve, add lynis config
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
28
systems/palatine-hill/plex/default.nix
Normal file
28
systems/palatine-hill/plex/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
7
systems/palatine-hill/plex/plex_permission.sh
Normal file
7
systems/palatine-hill/plex/plex_permission.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
plex_dir="/ZFS/ZFS-primary/plex"
|
||||
|
||||
chown docker-service:users -R "$plex_dir"
|
||||
find "$plex_dir" -type f -exec chmod 664 {} \;
|
||||
find "$plex_dir" -type d -exec chmod 775 {} \;
|
Reference in New Issue
Block a user