{ config, pkgs, lib, ... }: let musicFolder = "/data/fast/music"; vhostName = "music.${config.homelab.domain}"; in { # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/navidrome.nix services.navidrome = { enable = true; settings = { MusicFolder = musicFolder; }; }; services.nginx.virtualHosts."${vhostName}" = { forceSSL = true; useACMEHost = config.homelab.domain; listen = [ { addr = "192.168.6.40"; port = 443; ssl = true; } { addr = "192.168.6.40"; port = 80; ssl = false; } ]; locations."/" = { proxyPass = "http://127.0.0.1:4533"; proxyWebsockets = true; }; }; my.services.backup = { paths = [ config.systemd.services.navidrome.serviceConfig.WorkingDirectory ]; exclude = [ "${config.systemd.services.navidrome.serviceConfig.WorkingDirectory}/cache/" ]; }; }