server-configuration/services/sonarr.nix
2025-03-04 14:43:17 +01:00

37 lines
797 B
Nix

{...}: 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}";
};
};
};
};
}