mediaserver: Add mounts to systemd units
This commit is contained in:
parent
250bc99e3b
commit
4998a3c0d8
7 changed files with 117 additions and 64 deletions
|
@ -35,9 +35,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.podman-tubearchivist.serviceConfig = {
|
||||
systemd.services.podman-tubearchivist =
|
||||
let
|
||||
mounts = [ "mnt-media-YTDL.mount" ];
|
||||
in
|
||||
{
|
||||
requires = mounts;
|
||||
after = lib.mkMerge mounts;
|
||||
|
||||
serviceConfig = {
|
||||
TimeoutStopSec = lib.mkForce 30;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.podman-archivist-redis.serviceConfig = {
|
||||
TimeoutStopSec = lib.mkForce 30;
|
||||
|
|
Binary file not shown.
|
@ -7,10 +7,15 @@ let
|
|||
in
|
||||
{
|
||||
# The nix-provided options force a aria2-user to a certain degree
|
||||
systemd.services.aria2 = {
|
||||
systemd.services.aria2 =
|
||||
let
|
||||
mounts = [ "mnt-downloads.mount" ];
|
||||
in
|
||||
{
|
||||
description = "aria2 Service";
|
||||
requires = mounts;
|
||||
bindsTo = [ "wg.service" ];
|
||||
after = [ "wg.service" ];
|
||||
after = [ "wg.service" ] ++ mounts;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
preStart = ''
|
||||
|
|
|
@ -8,6 +8,22 @@
|
|||
openFirewall = false;
|
||||
};
|
||||
|
||||
systemd.services.jellyfin =
|
||||
let
|
||||
mounts = [
|
||||
"mnt-media-TV\\x20Shows.mount"
|
||||
"mnt-media-Documentaries.mount"
|
||||
"mnt-media-Anime.mount"
|
||||
"mnt-media-Movies.mount"
|
||||
"mnt-media-Deutsche\\x20Serien.mount"
|
||||
"mnt-media-Deutsche\\x20Filme.mount"
|
||||
];
|
||||
in
|
||||
{
|
||||
requires = mounts;
|
||||
after = lib.mkMerge mounts;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."jellyfin.internal.kempkens.network" = {
|
||||
listen = [
|
||||
{
|
||||
|
|
|
@ -8,9 +8,17 @@
|
|||
openFirewall = false;
|
||||
};
|
||||
|
||||
systemd.services.radarr = {
|
||||
systemd.services.radarr =
|
||||
let
|
||||
mounts = [
|
||||
"mnt-media-Movies.mount"
|
||||
"mnt-downloads.mount"
|
||||
];
|
||||
in
|
||||
{
|
||||
requires = mounts;
|
||||
bindsTo = [ "wg.service" ];
|
||||
after = lib.mkForce [ "wg.service" ];
|
||||
after = lib.mkForce ([ "wg.service" ] ++ mounts);
|
||||
|
||||
serviceConfig = {
|
||||
NetworkNamespacePath = "/var/run/netns/wg";
|
||||
|
|
|
@ -2,10 +2,15 @@
|
|||
|
||||
{
|
||||
# The nix-provided options force a sabnzbd-user to a certain degree
|
||||
systemd.services.sabnzbd = {
|
||||
systemd.services.sabnzbd =
|
||||
let
|
||||
mounts = [ "mnt-downloads.mount" ];
|
||||
in
|
||||
{
|
||||
description = "sabnzbd server";
|
||||
requires = mounts;
|
||||
bindsTo = [ "wg.service" ];
|
||||
after = [ "wg.service" ];
|
||||
after = [ "wg.service" ] ++ mounts;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
|
|
|
@ -8,9 +8,19 @@
|
|||
openFirewall = false;
|
||||
};
|
||||
|
||||
systemd.services.sonarr = {
|
||||
systemd.services.sonarr =
|
||||
let
|
||||
mounts = [
|
||||
"mnt-media-TV\\x20Shows.mount"
|
||||
"mnt-media-Documentaries.mount"
|
||||
"mnt-media-Anime.mount"
|
||||
"mnt-downloads.mount"
|
||||
];
|
||||
in
|
||||
{
|
||||
requires = mounts;
|
||||
bindsTo = [ "wg.service" ];
|
||||
after = lib.mkForce [ "wg.service" ];
|
||||
after = lib.mkForce ([ "wg.service" ] ++ mounts);
|
||||
|
||||
serviceConfig = {
|
||||
NetworkNamespacePath = "/var/run/netns/wg";
|
||||
|
|
Loading…
Reference in a new issue