nixos/services/navidrome/default.nix

27 lines
704 B
Nix

{ pkgs, ... }:
let baseUrl = "music.xenia.me.uk";
in {
imports = [ ../traefik/default.nix ];
environment.systemPackages = with pkgs; [ ffmpeg ];
services = rec {
navidrome = {
enable = true;
settings = {
Address = "127.0.0.1";
BaseUrl = "https://${baseUrl}";
Port = 4533;
};
};
traefik.dynamicConfigOptions.http = {
routers.navidrome = {
rule = "Host(`${baseUrl}`)";
entryPoints = [ "http" "https" ];
service = "synapse-service";
tls = { certResolver = "default"; };
};
services.navidrome.loadBalancer.servers =
[{ url = "http://localhost:${navidrome.settings.Port}"; }];
};
};
}