{...}: let host = "127.0.0.1"; port = 8989; in { microvm.autostart = ["sonarr"]; microvm.vms."sonarr" = { config = { system.stateVersion = "24.11"; microvm.shares = [ { tag = "ro-store"; source = "/nix/store"; mountPoint = "/nix/.ro-store"; } { tag = "data-dir"; source = "/var/lib/sonarr"; mountPoint = "/var/lib/sonarr"; } ]; services.sonarr = { enable = true; openFirewall = true; # Hide sonarr behind firewall }; services.nginx.virtualHosts."sonarr.spoodythe.one" = { addSSL = true; enableACME = true; locations."/" = { proxyPass = "http://${host}:${toString port}"; }; }; }; }; }