diff options
author | Akshay <[email protected]> | 2024-05-06 10:24:21 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2024-05-06 10:24:21 +0100 |
commit | ed0965f80620c7183a863730cfa4282db4aaa777 (patch) | |
tree | 2ce31802f5e1639ec78d1c8e2ad0edb35217e95a /hosts/laurel | |
parent | f073f0fc110273d5a18099997ce9180fc2d5842e (diff) |
add media services
Diffstat (limited to 'hosts/laurel')
-rw-r--r-- | hosts/laurel/configuration.nix | 1 | ||||
-rw-r--r-- | hosts/laurel/media.nix | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/hosts/laurel/configuration.nix b/hosts/laurel/configuration.nix index 6db299c..a2559ae 100644 --- a/hosts/laurel/configuration.nix +++ b/hosts/laurel/configuration.nix | |||
@@ -10,6 +10,7 @@ | |||
10 | # Include the results of the hardware scan. | 10 | # Include the results of the hardware scan. |
11 | ./hardware-configuration.nix | 11 | ./hardware-configuration.nix |
12 | ./servarr.nix | 12 | ./servarr.nix |
13 | ./media.nix | ||
13 | ]; | 14 | ]; |
14 | 15 | ||
15 | # Use the systemd-boot EFI boot loader. | 16 | # Use the systemd-boot EFI boot loader. |
diff --git a/hosts/laurel/media.nix b/hosts/laurel/media.nix new file mode 100644 index 0000000..b5d45dc --- /dev/null +++ b/hosts/laurel/media.nix | |||
@@ -0,0 +1,39 @@ | |||
1 | { config, lib, pkgs, ... }: | ||
2 | |||
3 | { | ||
4 | services.jellyfin = { | ||
5 | enable = true; | ||
6 | openFirewall = true; | ||
7 | group = "torrent"; | ||
8 | }; | ||
9 | services.nginx.virtualHosts."stream.${config.networking.hostName}" = { | ||
10 | listen = [{ port = 80; addr = "0.0.0.0"; }]; | ||
11 | locations."/" = { | ||
12 | proxyPass = "http://127.0.0.1:8096"; | ||
13 | proxyWebsockets = true; | ||
14 | }; | ||
15 | }; | ||
16 | |||
17 | services.navidrome = { | ||
18 | enable = true; | ||
19 | openFirewall = true; | ||
20 | settings = { | ||
21 | MusicFolder = "/servarr/lidarr/"; | ||
22 | DataFolder = "/etc/navidrome/data"; | ||
23 | CacheFolder = "/etc/navidrome/cache"; | ||
24 | Address = "0.0.0.0"; | ||
25 | Port = 4533; | ||
26 | AuthRequestLimit = 0; | ||
27 | EnableTranscodingConfig = true; | ||
28 | }; | ||
29 | }; | ||
30 | services.nginx.virtualHosts."music.${config.networking.hostName}" = { | ||
31 | listen = [{ port = 80; addr = "0.0.0.0"; }]; | ||
32 | locations."/" = { | ||
33 | proxyPass = "http://127.0.0.1:${builtins.toString config.services.navidrome.settings.Port}"; | ||
34 | proxyWebsockets = true; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | } | ||
39 | |||