placed sonarr in a vm
This commit is contained in:
parent
f3c5706763
commit
6bbccc4f5a
|
@ -8,6 +8,7 @@
|
|||
./services/website.nix
|
||||
./services/mailserver.nix
|
||||
./services/fail2ban.nix
|
||||
./services/sonarr.nix
|
||||
./services/misc.nix
|
||||
|
||||
./modules/git.nix
|
||||
|
|
|
@ -8,11 +8,10 @@ nixpkgs.lib.extend (
|
|||
inherit (prev) mkIf;
|
||||
in {
|
||||
extensions = {
|
||||
createvm = {
|
||||
createVm = {
|
||||
name,
|
||||
system ? nixpkgs.system,
|
||||
config,
|
||||
}: {microvm, ...}: {
|
||||
}: config: {microvm, ...}: {
|
||||
imports = [microvm.host];
|
||||
microvm.hypervisor = "cloud-hypervisor";
|
||||
microvm.vms.${name} = {
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
{...}: let
|
||||
{lib, ...}: let
|
||||
host = "127.0.0.1";
|
||||
port = 8989;
|
||||
in {
|
||||
services.sonarr = {
|
||||
enable = true;
|
||||
openFirewall = false; # Hide sonarr behind firewall
|
||||
};
|
||||
imports = [
|
||||
(lib.extensions.createVm {name = "Sonarr VM";} {
|
||||
services.sonarr = {
|
||||
enable = true;
|
||||
openFirewall = false; # Hide sonarr behind firewall
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."git.spoodythe.one" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${host}:${toString port}";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."git.spoodythe.one" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${host}:${toString port}";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue