diff --git a/services/sonarr.nix b/services/sonarr.nix index 4810676..d7a2c5d 100644 --- a/services/sonarr.nix +++ b/services/sonarr.nix @@ -1,21 +1,35 @@ -{lib, ...}: let +{ + lib, + nixpkgs, + ... +}: let host = "127.0.0.1"; port = 8989; in { - imports = [ - (lib.extensions.createVm {name = "Sonarr VM";} { + 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 = false; # Hide sonarr behind firewall + openFirewall = true; # Hide sonarr behind firewall }; - services.nginx.virtualHosts."git.spoodythe.one" = { + services.nginx.virtualHosts."sonarr.spoodythe.one" = { addSSL = true; enableACME = true; locations."/" = { proxyPass = "http://${host}:${toString port}"; }; }; - }) - ]; + }; + }; }