From 817514b8b7378ac58a35d0da75c208ded1adc058 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Tue, 3 Sep 2024 19:26:59 +0200 Subject: [PATCH] challenger: add navidrome --- hosts/challenger/configuration.nix | 1 + hosts/challenger/services/navidrome.nix | 20 ++++++++++++++++++++ hosts/defiant/services/nginx.nix | 1 + 3 files changed, 22 insertions(+) create mode 100644 hosts/challenger/services/navidrome.nix diff --git a/hosts/challenger/configuration.nix b/hosts/challenger/configuration.nix index 0a9d206..eccc359 100644 --- a/hosts/challenger/configuration.nix +++ b/hosts/challenger/configuration.nix @@ -14,6 +14,7 @@ ./services/calibre.nix ./services/jellyfin.nix ./services/komga.nix + ./services/navidrome.nix ./services/nextcloud.nix ./services/nginx.nix ./services/postgres.nix diff --git a/hosts/challenger/services/navidrome.nix b/hosts/challenger/services/navidrome.nix new file mode 100644 index 0000000..1156819 --- /dev/null +++ b/hosts/challenger/services/navidrome.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: +let + domain = "music.feal.no"; + cfg = config.services.navidrome; +in { + services.navidrome = { + enable = true; + settings = { + BaseUrl = "https://${domain}"; + EnableSharing = true; + EnableTranscodingConfig = true; + MusicFolder = "/tank/media/music/"; + SubsonicArtistParticipations = true; + }; + }; + + services.nginx.virtualHosts."${domain}".locations."/" = { + proxyPass = "http://${cfg.settings.Address}:${toString cfg.settings.Port}"; + }; +} diff --git a/hosts/defiant/services/nginx.nix b/hosts/defiant/services/nginx.nix index 5cfaf81..fb72933 100644 --- a/hosts/defiant/services/nginx.nix +++ b/hosts/defiant/services/nginx.nix @@ -65,5 +65,6 @@ in { "git.feal.no" = publicProxy "http://unix:${gitea.server.HTTP_ADDR}" {}; "jf.feal.no" = publicProxy "http://jellyfin.home.feal.no/" {}; "iam.feal.no" = publicProxy "http://${keycloak.http-host}:${toString keycloak.http-port}" {}; + "music.feal.no" = publicProxy "http://challenger.home.feal.no/" {}; }; }