nixos-config/configurations/camelot/jellyfin.nix

86 lines
2 KiB
Nix
Raw Normal View History

2024-01-23 21:16:29 +01:00
{ extraInfo, pkgs, ... }:
2023-11-23 21:55:37 +01:00
{
2024-01-25 19:38:56 +01:00
users.groups.media = { };
2023-11-23 21:55:37 +01:00
services.jellyfin.enable = true;
2023-11-24 18:45:27 +01:00
services.nginx.virtualHosts.${extraInfo.jellyfinURI} = {
enableACME = true;
forceSSL = true;
locations = {
"/" = {
proxyPass = "http://localhost:8096";
};
"/socket" = {
proxyPass = "http://localhost:8096";
proxyWebsockets = true;
};
};
};
2023-11-24 22:12:02 +01:00
services.sonarr = {
enable = true;
openFirewall = true;
2024-01-25 19:38:56 +01:00
group = "media";
2023-11-24 22:12:02 +01:00
};
2023-11-24 22:28:06 +01:00
services.radarr = {
enable = true;
openFirewall = true;
2024-01-25 19:38:56 +01:00
group = "media";
};
services.bazarr = {
enable = true;
openFirewall = true;
group = "media";
2023-11-24 22:28:06 +01:00
};
# Torrent client
services.deluge = {
enable = true;
2024-01-25 20:02:04 +01:00
web = {
enable = true;
openFirewall = true;
};
2024-01-25 19:38:56 +01:00
group = "media";
2023-11-24 22:28:06 +01:00
};
2024-01-25 21:00:39 +01:00
services.jackett = {
enable = true;
2024-04-11 20:15:47 +02:00
package = pkgs.jackett.overrideAttrs (_: _: { doCheck = false; });
2024-01-25 21:00:39 +01:00
openFirewall = true;
};
2024-04-11 20:15:47 +02:00
systemd.services.delugedweb.requires = [ "deluged-proxy.service" ];
systemd.services.deluged.bindsTo = [ "wireguard-wg1.service" ];
systemd.services.deluged.requires = [ "network-online.target" ];
systemd.services.deluged.serviceConfig.NetworkNamespacePath = "/var/run/netns/wg1ns";
2024-01-25 19:38:56 +01:00
systemd.services.deluged.serviceConfig.PrivateNetwork = true;
2024-01-23 21:16:29 +01:00
systemd.sockets.deluged-proxy = {
description = "Socket for deluge-web to deluged in network namespace";
listenStreams = [ "58846" ];
wantedBy = [ "sockets.target" ];
};
systemd.services.deluged-proxy = {
description = "Proxy for deluge-web to deluged in network namespace";
2024-04-11 20:15:47 +02:00
requires = [
"deluged.service"
"deluged-proxy.socket"
];
after = [
"deluged.service"
"deluged-proxy.socket"
];
2024-01-23 21:16:29 +01:00
unitConfig.JoinsNamespaceOf = "deluged.service";
serviceConfig = {
User = "deluge";
2024-01-25 20:02:04 +01:00
Group = "media";
2024-01-23 21:16:29 +01:00
ExecStart = "${pkgs.systemd}/lib/systemd/systemd-socket-proxyd 127.0.0.1:58846";
PrivateNetwork = true;
};
};
2023-11-23 21:55:37 +01:00
}