server-configuration/services/sonarr.nix
2025-03-04 13:56:23 +01:00

36 lines
703 B
Nix

{
lib,
nixpkgs,
...
}: let
host = "127.0.0.1";
port = 8989;
in {
microvm.vms."sonarr" = {
pkgs = import nixpkgs {system = nixpkgs.system;};
microvm.hyprvisor = "cloud-hyprvisor";
microvm.shares = [
{
tag = "ro-store";
source = "/nix/store";
mountPoint = "/nix/.ro-store";
}
];
config = {
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}";
};
};
};
};
}