nixos/services/navidrome/default.nix

29 lines
698 B
Nix

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