summaryrefslogtreecommitdiffstats
path: root/hosts/poweredge/navidrome.nix
blob: fa40ed40c9f86969a5a876a427127c2c73449118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
	containers.navidrome = {
		autoStart = true;
		privateNetwork = true;
		hostBridge = "br-lan0";
		localMacAddress = "02:00:00:00:00:08";

		bindMounts = {
			"/media/music" = {
				hostPath = "/media/ingens/media/music";
				isReadOnly = true;
			};
			#"/media/podcasts" = {
			#	hostPath = "/media/ingens/media/podcasts";
			#	isReadOnly = true;
			#};
		};

		config = { lib, config, pkgs, ... }: {
			# Network
			networking.interfaces.eth0.useDHCP = true;
			networking.firewall.allowedTCPPorts = [ 80 ];  # Caddy

			# Navidrome
			services.navidrome = {
				enable = true;

				plugins = with pkgs.navidromePlugins; [
					#audiomuseai
					listenbrainz-daily-playlist
					#lyrics-plugin
				];

				settings.MusicFolder = "/media/music/library";

				# The lyrics plugin bundle is named lyrics-plugin.ndp.
				settings.LyricsPriority = ".ttml,.yaml,.yml,.elrc,.srt,lyrics-plugin,embedded,.lrc,.txt";
			};

			# Reverse proxy
			services.caddy = {
				enable = true;
				virtualHosts.":80".extraConfig = ''
					reverse_proxy localhost:4533
				'';
			};

			system.stateVersion = "26.05";
		};
	};
}