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