{ config, pkgs, lib, ... }: let cfg = config.my.services.navidrome; in { options.my.services.navidrome = with lib; { enable = mkEnableOption "Navidrome Music Server"; musicFolder = mkOption { type = types.str; example = "/data/fast/music"; description = "Music folder"; }; }; config = lib.mkIf cfg.enable { services.navidrome = { enable = true; settings = { MusicFolder = cfg.musicFolder; Address = "0.0.0.0"; httpPort = "4533"; }; }; my.services.backup = { paths = [ "/var/lib/navidrome" ]; }; networking.firewall.allowedTCPPorts = [ 4533 ]; }; }