puter/hosts/headless/abacus/navidrome.nix

24 lines
567 B
Nix
Raw Permalink Normal View History

2025-03-23 21:48:46 +00:00
{config, ...}: let
virtualHostName = "navidrome.helveticanonstandard.net";
2024-09-15 12:16:32 +00:00
in {
services.navidrome = {
enable = true;
settings = {
Address = "localhost";
Port = 8050;
MusicFolder = "/srv/music";
2025-04-02 15:35:50 +00:00
EnableSharing = true;
2024-09-15 12:16:32 +00:00
};
};
services.nginx.virtualHosts.${virtualHostName} = {
enableACME = true;
forceSSL = true;
2025-03-23 21:48:46 +00:00
locations."/".proxyPass = let
2024-09-15 12:16:32 +00:00
host = config.services.navidrome.settings.Address;
2025-03-23 21:48:46 +00:00
port = builtins.toString config.services.navidrome.settings.Port;
in "http://${host}:${port}";
2024-09-15 12:16:32 +00:00
};
}