Major cleanup

This commit is contained in:
William 2024-09-18 12:42:20 -03:00
parent 46275901fd
commit b2ff93693a
24 changed files with 39 additions and 289 deletions

View file

@ -1,18 +0,0 @@
{ config, pkgs, lib, ... }:
{
virtualisation.oci-containers.containers."actual" = {
image = "docker.io/actualbudget/actual-server:latest";
ports = [ "${config.ports.actual}:5006" ];
volumes = [ "/data/actual:/data" ];
extraOptions =
[ "--pull=newer" "--label=io.containers.autoupdate=registry" ];
};
services.nginx.virtualHosts."actual.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:${config.ports.actual}";
};
}

View file

@ -1,66 +0,0 @@
{ inputs, config, pkgs, lib, ... }:
{
services = {
bazarr = {
enable = true;
user = "user";
group = "hosted";
};
jackett.enable = true;
qbittorrent = {
enable = true;
user = "user";
group = "hosted";
port = lib.toInt "${config.ports.qbittorrent}";
};
radarr = {
enable = true;
user = "user";
group = "hosted";
};
sonarr = {
enable = true;
user = "user";
group = "hosted";
};
nginx.virtualHosts = {
"bazarr.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:${config.ports.bazaar}";
};
"jackett.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:${config.ports.jackett}";
};
"qbittorrent.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass =
"http://127.0.0.1:${config.ports.qbittorrent}";
};
"radarr.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:${config.ports.radarr}";
};
"sonarr.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:${config.ports.sonarr}";
};
};
};
}

View file

@ -2,8 +2,6 @@
{
imports = [
./actual.nix
./arr.nix
./changedetection.nix
./cinny.nix
./hardware-configuration.nix

View file

@ -1,48 +0,0 @@
{ inputs, config, pkgs, lib, ... }:
{
services = {
matrix-conduit = {
enable = true;
extraEnvironment = { RUST_MIN_STACK = "16777216"; };
package = pkgs.unstable.matrix-conduit;
settings.global = {
server_name = "baduhai.dev";
address = "127.0.0.1";
port = 6167;
max_request_size = 20000000;
allow_registration = true;
allow_encryption = false;
allow_federation = false;
};
};
nginx.virtualHosts."matrix.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass = "http://127.0.0.1:${config.ports.cinny2}";
locations."/_matrix/".proxyPass = "http://127.0.0.1:6167$request_uri";
locations."= /.well-known/matrix/client" = {
alias = pkgs.writeText "matrix-wk-client" ''
{ "m.homeserver": { "base_url": "https://matrix.baduhai.dev" } }
'';
extraConfig = "add_header Access-Control-Allow-Origin *;";
};
locations."= /.well-known/matrix/server" = {
alias = pkgs.writeText "matrix-wk-server" ''
{ "m.server": "matrix.baduhai.dev:443" }
'';
extraConfig = "add_header Access-Control-Allow-Origin *;";
};
};
};
virtualisation.oci-containers.containers."cinny2" = {
image = "ghcr.io/cinnyapp/cinny:latest";
ports = [ "${config.ports.cinny2}:80" ];
environment = { TZ = "America/Bahia"; };
volumes = [ "/data/matrix/cinny-config.json:/app/config.json" ];
extraOptions = [ "--pull=always" ];
};
}

View file

@ -1,20 +0,0 @@
{ inputs, config, pkgs, lib, ... }:
{
services = {
node-red = {
enable = true;
group = "hosted";
withNpmAndGcc = true;
userDir = "/data/node-red";
};
nginx.virtualHosts."node-red.baduhai.dev" = {
useACMEHost = "baduhai.dev";
forceSSL = true;
kTLS = true;
locations."/".proxyPass =
"http://127.0.0.1:${builtins.toString config.services.node-red.port}";
};
};
}

View file

@ -6,7 +6,7 @@
groups = {
hosted = {
gid = 1005;
members = [ "user" "shiori" "minecraft" "paperless" "vaultwarden" ];
members = [ "user" "minecraft" "paperless" "vaultwarden" ];
};
};
};