disabled all /mnt/pool dependent servers

This commit is contained in:
Danilo Reyes 2024-01-10 11:39:01 -06:00
parent dcc2d9a6c1
commit 0dbf16ac98
5 changed files with 443 additions and 439 deletions

View File

@ -824,7 +824,7 @@ services = {
settings = { settings = {
inotify = "yes"; inotify = "yes";
media_dir = [ media_dir = [
"/mnt/pool" "/home/jawz/Backups/glue"
]; ];
}; };
}; };
@ -905,11 +905,11 @@ systemd = {
myPkg = pkgs.qbittorrent-nox; myPkg = pkgs.qbittorrent-nox;
in [ myPkg ]; in [ myPkg ];
services = { services = {
"qbittorrent-nox@jawz" = { # "qbittorrent-nox@jawz" = {
enable = true; # enable = true;
overrideStrategy = "asDropin"; # overrideStrategy = "asDropin";
wantedBy = [ "multi-user.target" ]; # wantedBy = [ "multi-user.target" ];
}; # };
# sub-sync = { # sub-sync = {
# restartIfChanged = true; # restartIfChanged = true;
# description = "syncronizes subtitles downloaded & modified today"; # description = "syncronizes subtitles downloaded & modified today";
@ -945,100 +945,100 @@ in [ myPkg ];
}; };
user = { user = {
services = { services = {
HentaiAtHome = { # HentaiAtHome = {
enable = true; # enable = true;
restartIfChanged = true; # restartIfChanged = true;
description = "Run hentai@home server"; # description = "Run hentai@home server";
wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
serviceConfig = { # serviceConfig = {
Restart = "on-failure"; # Restart = "on-failure";
RestartSec = 30; # RestartSec = 30;
WorkingDirectory="/mnt/disks/hnbox"; # WorkingDirectory="/mnt/disks/hnbox";
ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome"; # ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome";
}; # };
}; # };
unpackerr = { # unpackerr = {
enable = true; # enable = true;
restartIfChanged = true; # restartIfChanged = true;
description = "Run unpackerr"; # description = "Run unpackerr";
wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
serviceConfig = { # serviceConfig = {
Restart = "on-failure"; # Restart = "on-failure";
RestartSec = 30; # RestartSec = 30;
ExecStart = "${pkgs.unpackerr}/bin/unpackerr -c /home/jawz/.config/unpackerr.conf"; # ExecStart = "${pkgs.unpackerr}/bin/unpackerr -c /home/jawz/.config/unpackerr.conf";
}; # };
}; # };
manage-library = { # manage-library = {
enable = true; # enable = true;
restartIfChanged = true; # restartIfChanged = true;
description = "Run the manage library bash script"; # description = "Run the manage library bash script";
wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
path = [ # path = [
pkgs.bash # pkgs.bash
pkgs.nix # pkgs.nix
jawzManageLibrary # jawzManageLibrary
]; # ];
serviceConfig = { # serviceConfig = {
Restart = "on-failure"; # Restart = "on-failure";
RestartSec = 30; # RestartSec = 30;
ExecStart = "${jawzManageLibrary}/bin/manage-library"; # ExecStart = "${jawzManageLibrary}/bin/manage-library";
}; # };
}; # };
tasks = { # tasks = {
restartIfChanged = true; # restartIfChanged = true;
description = "Run a tasks script which keeps a lot of things organized"; # description = "Run a tasks script which keeps a lot of things organized";
wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
path = [ # path = [
pkgs.bash # pkgs.bash
pkgs.nix # pkgs.nix
jawzTasks # jawzTasks
]; # ];
serviceConfig = { # serviceConfig = {
Restart = "on-failure"; # Restart = "on-failure";
RestartSec = 30; # RestartSec = 30;
ExecStart = "${jawzTasks}/bin/tasks"; # ExecStart = "${jawzTasks}/bin/tasks";
}; # };
}; # };
qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage"; in { # qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage"; in {
restartIfChanged = true; # restartIfChanged = true;
description = "Tidy up my torrents"; # description = "Tidy up my torrents";
wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
path = [ # path = [
pkgs.python3 # pkgs.python3
pkgs.pipenv # pkgs.pipenv
]; # ];
serviceConfig = { # serviceConfig = {
Restart = "on-failure"; # Restart = "on-failure";
RestartSec = 30; # RestartSec = 30;
ExecStart = "${qbit_dir}/.venv/bin/python3 ${qbit_dir}/qbit_manage.py -r -c ${qbit_dir}/config.yml"; # ExecStart = "${qbit_dir}/.venv/bin/python3 ${qbit_dir}/qbit_manage.py -r -c ${qbit_dir}/config.yml";
}; # };
}; # };
}; };
timers = { timers = {
tasks = { # tasks = {
enable = true; # enable = true;
description = "Run a tasks script which keeps a lot of things organized"; # description = "Run a tasks script which keeps a lot of things organized";
wantedBy = [ "timers.target" ]; # wantedBy = [ "timers.target" ];
timerConfig = { # timerConfig = {
OnCalendar = "*:0/10"; # OnCalendar = "*:0/10";
}; # };
}; # };
manage-library = { # manage-library = {
enable = true; # enable = true;
description = "Run the manage library bash script"; # description = "Run the manage library bash script";
wantedBy = [ "timers.target" ]; # wantedBy = [ "timers.target" ];
timerConfig = { # timerConfig = {
OnCalendar = "00:30"; # OnCalendar = "00:30";
}; # };
}; # };
qbit_manage = { # qbit_manage = {
enable = true; # enable = true;
description = "Tidy up my torrents"; # description = "Tidy up my torrents";
wantedBy = [ "timers.target" ]; # wantedBy = [ "timers.target" ];
timerConfig = { # timerConfig = {
OnCalendar = "*:0/10"; # OnCalendar = "*:0/10";
}; # };
}; # };
}; };
}; };
}; };

View File

@ -17,29 +17,29 @@
oci-containers = { oci-containers = {
backend = "docker"; backend = "docker";
containers = { containers = {
collabora = { # collabora = {
autoStart = true; # autoStart = true;
image = "collabora/code"; # image = "collabora/code";
imageFile = pkgs.dockerTools.pullImage { # imageFile = pkgs.dockerTools.pullImage {
imageName = "collabora/code"; # imageName = "collabora/code";
imageDigest = # imageDigest =
"sha256:aab41379baf5652832e9237fcc06a768096a5a7fccc66cf8bd4fdb06d2cbba7f"; # "sha256:aab41379baf5652832e9237fcc06a768096a5a7fccc66cf8bd4fdb06d2cbba7f";
sha256 = "sha256-M66lynhzaOEFnE15Sy1N6lBbGDxwNw6ap+IUJAvoCLs="; # sha256 = "sha256-M66lynhzaOEFnE15Sy1N6lBbGDxwNw6ap+IUJAvoCLs=";
}; # };
ports = [ "9980:9980" ]; # ports = [ "9980:9980" ];
environment = { # environment = {
TZ = "America/Mexico_City"; # TZ = "America/Mexico_City";
domain = "cloud.servidos.lat"; # domain = "cloud.servidos.lat";
aliasgroup1 = "cloud.servidos.lat:443"; # aliasgroup1 = "cloud.servidos.lat:443";
aliasgroup2 = "cloud.rotehaare.art:443"; # aliasgroup2 = "cloud.rotehaare.art:443";
dictionaries = "en_CA en_US es_MX es_ES fr_FR it pt_BR ru"; # dictionaries = "en_CA en_US es_MX es_ES fr_FR it pt_BR ru";
extra_params = '' # extra_params = ''
--o:ssl.enable=false # --o:ssl.enable=false
--o:ssl.termination=true # --o:ssl.termination=true
''; # '';
}; # };
extraOptions = [ "--cap-add" "MKNOD" ]; # extraOptions = [ "--cap-add" "MKNOD" ];
}; # };
ryot = { ryot = {
image = "ghcr.io/ignisda/ryot:latest"; image = "ghcr.io/ignisda/ryot:latest";
ports = [ "8765:8000" ]; ports = [ "8765:8000" ];
@ -66,8 +66,8 @@
PUID = "1000"; PUID = "1000";
PGID = "100"; PGID = "100";
BASE_URL = "https://scrobble.servidos.lat"; BASE_URL = "https://scrobble.servidos.lat";
JELLYFIN_USER = "jawz"; # JELLYFIN_USER = "jawz";
JELLYFIN_SERVER = "DaniloFlix"; # JELLYFIN_SERVER = "DaniloFlix";
DEEZER_CLIENT_ID = "657431"; DEEZER_CLIENT_ID = "657431";
DEEZER_CLIENT_SECRET = "cb2ad03682dd5a55dfef857388ef181e"; DEEZER_CLIENT_SECRET = "cb2ad03682dd5a55dfef857388ef181e";
DEEZER_REDIRECT_URI = "http://192.168.1.69:9078/deezer/callback"; DEEZER_REDIRECT_URI = "http://192.168.1.69:9078/deezer/callback";
@ -104,11 +104,11 @@
"flame.icon" = "bookmark-music"; "flame.icon" = "bookmark-music";
}; };
}; };
flaresolverr = { # flaresolverr = {
autoStart = true; # autoStart = true;
image = "ghcr.io/flaresolverr/flaresolverr:latest"; # image = "ghcr.io/flaresolverr/flaresolverr:latest";
ports = [ "8191:8191" ]; # ports = [ "8191:8191" ];
}; # };
flame = { flame = {
autoStart = true; autoStart = true;
image = "pawelmalak/flame"; image = "pawelmalak/flame";
@ -136,30 +136,30 @@
PASSWORD = "RkawpqMc8lR56QyU7JSfiLhG"; PASSWORD = "RkawpqMc8lR56QyU7JSfiLhG";
}; };
}; };
lidarr = { # lidarr = {
autoStart = true; # autoStart = true;
image = "lscr.io/linuxserver/lidarr:latest"; # image = "lscr.io/linuxserver/lidarr:latest";
ports = [ "8686:8686" ]; # ports = [ "8686:8686" ];
environment = { # environment = {
TZ = "America/Mexico_City"; # TZ = "America/Mexico_City";
PUID = "1000"; # PUID = "1000";
PGID = "100"; # PGID = "100";
}; # };
volumes = [ # volumes = [
"/mnt/pool/multimedia:/data" # "/mnt/pool/multimedia:/data"
"/mnt/pool/multimedia/media/Music:/music" # "/mnt/pool/multimedia/media/Music:/music"
"/mnt/pool/multimedia/media/MusicVideos:/music-videos" # "/mnt/pool/multimedia/media/MusicVideos:/music-videos"
"/var/lib/docker-configs/lidarr/files:/config" # "/var/lib/docker-configs/lidarr/files:/config"
"/var/lib/docker-configs/lidarr/custom-services.d:/custom-services.d" # "/var/lib/docker-configs/lidarr/custom-services.d:/custom-services.d"
"/var/lib/docker-configs/lidarr/custom-cont-init.d:/custom-cont-init.d" # "/var/lib/docker-configs/lidarr/custom-cont-init.d:/custom-cont-init.d"
]; # ];
labels = { # labels = {
"flame.type" = "application"; # "flame.type" = "application";
"flame.name" = "Lidarr"; # "flame.name" = "Lidarr";
"flame.url" = "music.servidos.lat"; # "flame.url" = "music.servidos.lat";
"flame.icon" = "music"; # "flame.icon" = "music";
}; # };
}; # };
mealie = { mealie = {
autoStart = true; autoStart = true;
image = "ghcr.io/mealie-recipes/mealie:v1.0.0-RC2"; image = "ghcr.io/mealie-recipes/mealie:v1.0.0-RC2";
@ -189,19 +189,19 @@
"flame.icon" = "fridge"; "flame.icon" = "fridge";
}; };
}; };
go-vod = { # go-vod = {
autoStart = true; # autoStart = true;
image = "radialapps/go-vod"; # image = "radialapps/go-vod";
environment = { # environment = {
TZ = "America/Mexico_City"; # TZ = "America/Mexico_City";
NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}"; # NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}";
NVIDIA_VISIBLE_DEVICES = "all"; # NVIDIA_VISIBLE_DEVICES = "all";
}; # };
volumes = [ "ncdata:/var/www/html:ro" ]; # volumes = [ "ncdata:/var/www/html:ro" ];
extraOptions = [ # extraOptions = [
"--device=/dev/dri" # VA-API (omit for NVENC) # "--device=/dev/dri" # VA-API (omit for NVENC)
]; # ];
}; # };
}; };
}; };
}; };

View File

@ -18,26 +18,26 @@
device = "/dev/disk/by-uuid/af72f45c-cf7c-4e7d-8eab-2a95ab754921"; device = "/dev/disk/by-uuid/af72f45c-cf7c-4e7d-8eab-2a95ab754921";
preLVM = true; preLVM = true;
}; };
disk1 = { # disk1 = {
device = "/dev/disk/by-uuid/a9b0f346-7e38-40a6-baf6-3ad80cafc842"; # device = "/dev/disk/by-uuid/a9b0f346-7e38-40a6-baf6-3ad80cafc842";
preLVM = true; # preLVM = true;
}; # };
disk2 = { # disk2 = {
device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771"; # device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771";
preLVM = true; # preLVM = true;
}; # };
disk3 = { # disk3 = {
device = "/dev/disk/by-uuid/8cd728f6-0d5b-4cea-8f7d-01aad11192c1"; # device = "/dev/disk/by-uuid/8cd728f6-0d5b-4cea-8f7d-01aad11192c1";
preLVM = true; # preLVM = true;
}; # };
disk4 = { # disk4 = {
device = "/dev/disk/by-uuid/7fcac808-491f-4846-a4a9-a34cc77cb43d"; # device = "/dev/disk/by-uuid/7fcac808-491f-4846-a4a9-a34cc77cb43d";
preLVM = true; # preLVM = true;
}; # };
hnbox = { # hnbox = {
device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc"; # device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc";
preLVM = true; # preLVM = true;
}; # };
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
kernel.sysctl = { kernel.sysctl = {
@ -82,22 +82,22 @@
"datacow" "datacow"
]; ];
}; };
"/mnt/pool" = { # "/mnt/pool" = {
device = "/dev/disk/by-uuid/1e7cf787-e34d-4e3e-ac3c-0c07309dbd34"; # device = "/dev/disk/by-uuid/1e7cf787-e34d-4e3e-ac3c-0c07309dbd34";
fsType = "btrfs"; # fsType = "btrfs";
options = [ # options = [
"subvol=@data" # "subvol=@data"
"compress=zstd:3" # "compress=zstd:3"
"space_cache=v2" # "space_cache=v2"
"commit=120" # "commit=120"
"datacow" # "datacow"
]; # ];
}; # };
"/mnt/disks/hnbox" = { # "/mnt/disks/hnbox" = {
device = "/dev/mapper/hnbox"; # device = "/dev/mapper/hnbox";
fsType = "btrfs"; # fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ]; # options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
}; # };
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/c574cb53-dc40-46db-beff-0fe8a4787156"; device = "/dev/disk/by-uuid/c574cb53-dc40-46db-beff-0fe8a4787156";
fsType = "ext4"; fsType = "ext4";
@ -107,16 +107,16 @@
fsType = "vfat"; fsType = "vfat";
}; };
# NEXTCCLOUD # NEXTCCLOUD
"/var/lib/nextcloud/data" = { # "/var/lib/nextcloud/data" = {
device = "/mnt/pool/nextcloud"; # device = "/mnt/pool/nextcloud";
options = [ "bind" ]; # options = [ "bind" ];
depends = [ "/mnt/pool" ]; # depends = [ "/mnt/pool" ];
}; # };
"/mnt/jellyfin/media" = { # "/mnt/jellyfin/media" = {
device = "/mnt/pool/multimedia/media"; # device = "/mnt/pool/multimedia/media";
options = [ "bind" "ro" ]; # options = [ "bind" "ro" ];
depends = [ "/mnt/pool" ]; # depends = [ "/mnt/pool" ];
}; # };
# NFS # NFS
"/export/pool" = { "/export/pool" = {
device = "/mnt/pool"; device = "/mnt/pool";

View File

@ -65,13 +65,13 @@ in {
''; '';
}; };
in { in {
"movies.${domain}" = proxyArr radarrPort // { }; # "movies.${domain}" = proxyArr radarrPort // { };
"indexer.${domain}" = proxyArr prowlarrPort // { }; # "indexer.${domain}" = proxyArr prowlarrPort // { };
"music.${domain}" = proxyArr lidarrPort // { }; # "music.${domain}" = proxyArr lidarrPort // { };
"library.${domain}" = proxy kavitaPort // { }; # "library.${domain}" = proxy kavitaPort // { };
"start.${domain}" = proxy flamePort // { }; "start.${domain}" = proxy flamePort // { };
"subs.${domain}" = proxy bazarrPort // { }; # "subs.${domain}" = proxy bazarrPort // { };
"series.${domain}" = proxy sonarrPort // { }; # "series.${domain}" = proxy sonarrPort // { };
"vault.${domain}" = proxy vaultPort // { }; "vault.${domain}" = proxy vaultPort // { };
"copy.${domain}" = proxy microbinPort // { }; "copy.${domain}" = proxy microbinPort // { };
"mealie.${domain}" = proxy mealiePort // { }; "mealie.${domain}" = proxy mealiePort // { };
@ -96,128 +96,128 @@ in {
''; '';
}; };
}; };
"flix.${domain}" = { # "flix.${domain}" = {
forceSSL = true; # forceSSL = true;
enableACME = true; # enableACME = true;
http2 = true; # http2 = true;
extraConfig = '' # extraConfig = ''
# use a variable to store the upstream proxy # # use a variable to store the upstream proxy
# in this example we are using a hostname which is resolved via DNS # # in this example we are using a hostname which is resolved via DNS
# (if you aren't using DNS remove the resolver line and change the variable to point to an IP address # # (if you aren't using DNS remove the resolver line and change the variable to point to an IP address
resolver ${localhost} valid=30; # resolver ${localhost} valid=30;
location = / { # location = / {
return 302 http://$host/web/; # return 302 http://$host/web/;
#return 302 https://$host/web/; # #return 302 https://$host/web/;
} # }
location = /web/ { # location = /web/ {
# Proxy main Jellyfin traffic # # Proxy main Jellyfin traffic
proxy_pass http://${localhost}:${ # proxy_pass http://${localhost}:${
toString (jellyfinPort) # toString (jellyfinPort)
}/web/index.html; # }/web/index.html;
proxy_set_header Host $host; # proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; # proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme; # proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host; # proxy_set_header X-Forwarded-Host $http_host;
} # }
''; # '';
locations = { # locations = {
"/" = { # "/" = {
proxyPass = "http://${localhost}:${toString (jellyfinPort)}"; # proxyPass = "http://${localhost}:${toString (jellyfinPort)}";
proxyWebsockets = true; # proxyWebsockets = true;
}; # };
"/socket" = { # "/socket" = {
proxyPass = "http://${localhost}:${toString (jellyfinPort)}"; # proxyPass = "http://${localhost}:${toString (jellyfinPort)}";
extraConfig = '' # extraConfig = ''
proxy_http_version 1.1; # proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; # proxy_set_header Connection "upgrade";
''; # '';
}; # };
"~ /Items/(.*)/Images" = { # "~ /Items/(.*)/Images" = {
proxyPass = "http://${localhost}:${toString (jellyfinPort)}"; # proxyPass = "http://${localhost}:${toString (jellyfinPort)}";
extraConfig = '' # extraConfig = ''
proxy_cache jellyfin; # proxy_cache jellyfin;
proxy_cache_revalidate on; # proxy_cache_revalidate on;
proxy_cache_lock on; # proxy_cache_lock on;
''; # '';
}; # };
"~* ^/Videos/(.*)/(?!live)" = { # "~* ^/Videos/(.*)/(?!live)" = {
proxyPass = "http://${localhost}:${toString (jellyfinPort)}"; # proxyPass = "http://${localhost}:${toString (jellyfinPort)}";
extraConfig = '' # extraConfig = ''
# Set size of a slice (this amount will be always requested from the backend by nginx) # # Set size of a slice (this amount will be always requested from the backend by nginx)
# Higher value means more latency, lower more overhead # # Higher value means more latency, lower more overhead
# This size is independent of the size clients/browsers can request # # This size is independent of the size clients/browsers can request
# slice 2m; # # slice 2m;
proxy_cache jellyfin-videos; # proxy_cache jellyfin-videos;
proxy_cache_valid 200 206 301 302 30d; # proxy_cache_valid 200 206 301 302 30d;
proxy_ignore_headers Expires Cache-Control Set-Cookie X-Accel-Expires; # proxy_ignore_headers Expires Cache-Control Set-Cookie X-Accel-Expires;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; # proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_connect_timeout 15s; # proxy_connect_timeout 15s;
proxy_http_version 1.1; # proxy_http_version 1.1;
proxy_set_header Connection ""; # proxy_set_header Connection "";
# Transmit slice range to the backend # # Transmit slice range to the backend
proxy_set_header Range 2m; # proxy_set_header Range 2m;
# This saves bandwidth between the proxy and jellyfin, as a file is only downloaded one time instead of multiple times when multiple clients want to at the same time # # This saves bandwidth between the proxy and jellyfin, as a file is only downloaded one time instead of multiple times when multiple clients want to at the same time
# The first client will trigger the download, the other clients will have to wait until the slice is cached # # The first client will trigger the download, the other clients will have to wait until the slice is cached
# Esp. practical during SyncPlay # # Esp. practical during SyncPlay
proxy_cache_lock on; # proxy_cache_lock on;
proxy_cache_lock_age 60s; # proxy_cache_lock_age 60s;
proxy_cache_key "jellyvideo$uri?MediaSourceId=$arg_MediaSourceId&VideoCodec=$arg_VideoCodec&AudioCodec=$arg_AudioCodec&AudioStreamIndex=$arg_AudioStreamIndex&VideoBitrate=$arg_VideoBitrate&AudioBitrate=$arg_AudioBitrate&SubtitleMethod=$arg_SubtitleMethod&TranscodingMaxAudioChannels=$arg_TranscodingMaxAudioChannels&RequireAvc=$arg_RequireAvc&SegmentContainer=$arg_SegmentContainer&MinSegments=$arg_MinSegments&BreakOnNonKeyFrames=$arg_BreakOnNonKeyFrames&h264-profile=$h264Profile&h264-level=$h264Level&slicerange=2m"; # proxy_cache_key "jellyvideo$uri?MediaSourceId=$arg_MediaSourceId&VideoCodec=$arg_VideoCodec&AudioCodec=$arg_AudioCodec&AudioStreamIndex=$arg_AudioStreamIndex&VideoBitrate=$arg_VideoBitrate&AudioBitrate=$arg_AudioBitrate&SubtitleMethod=$arg_SubtitleMethod&TranscodingMaxAudioChannels=$arg_TranscodingMaxAudioChannels&RequireAvc=$arg_RequireAvc&SegmentContainer=$arg_SegmentContainer&MinSegments=$arg_MinSegments&BreakOnNonKeyFrames=$arg_BreakOnNonKeyFrames&h264-profile=$h264Profile&h264-level=$h264Level&slicerange=2m";
# add_header X-Cache-Status $upstream_cache_status; # This is only for debugging cache # # add_header X-Cache-Status $upstream_cache_status; # This is only for debugging cache
''; # '';
}; # };
}; # };
}; # };
${config.services.nextcloud.hostName} = { # ${config.services.nextcloud.hostName} = {
forceSSL = true; # forceSSL = true;
enableACME = true; # enableACME = true;
http2 = true; # http2 = true;
serverAliases = [ "cloud.rotehaare.art" ]; # serverAliases = [ "cloud.rotehaare.art" ];
locations = { # locations = {
"/".proxyWebsockets = true; # "/".proxyWebsockets = true;
# uh, equals what? # # uh, equals what?
"~ ^/nextcloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|oc[ms]-provider/.+|.+/richdocumentscode/proxy).php(?:$|/)" = # "~ ^/nextcloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|oc[ms]-provider/.+|.+/richdocumentscode/proxy).php(?:$|/)" =
{ }; # { };
}; # };
}; # };
"collabora.${domain}" = let # "collabora.${domain}" = let
collaboraString = "http://${localhost}:${toString (collaboraPort)}"; # collaboraString = "http://${localhost}:${toString (collaboraPort)}";
collaboraProxy = { # collaboraProxy = {
proxyPass = collaboraString; # proxyPass = collaboraString;
extraConfig = '' # extraConfig = ''
proxy_set_header Host $host; # proxy_set_header Host $host;
''; # '';
}; # };
collaboraSocket = { # collaboraSocket = {
proxyPass = collaboraString; # proxyPass = collaboraString;
extraConfig = '' # extraConfig = ''
proxy_set_header Upgrade $http_upgrade; # proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; # proxy_set_header Connection "Upgrade";
proxy_set_header Host $host; # proxy_set_header Host $host;
proxy_read_timeout 36000s; # proxy_read_timeout 36000s;
''; # '';
}; # };
in base { # in base {
# static files # # static files
"^~ /loleaflet" = collaboraProxy; # "^~ /loleaflet" = collaboraProxy;
# WOPI discovery URL # # WOPI discovery URL
"^~ /hosting/discovery" = collaboraProxy; # "^~ /hosting/discovery" = collaboraProxy;
# Capabilities # # Capabilities
"^~ /hosting/capabilities" = collaboraProxy; # "^~ /hosting/capabilities" = collaboraProxy;
# download, presentation, image upload and websocket # # download, presentation, image upload and websocket
"~ ^/lool" = collaboraSocket; # "~ ^/lool" = collaboraSocket;
# Admin Console websocket # # Admin Console websocket
"^~ /lool/adminws" = collaboraSocket; # "^~ /lool/adminws" = collaboraSocket;
}; # };
}; };
}; };
networking = { networking = {

View File

@ -45,41 +45,41 @@ in {
'') '')
]; ];
users.groups = { piracy.gid = 985; }; users.groups = { piracy.gid = 985; };
users.users = let base = { isSystemUser = true; }; # users.users = let base = { isSystemUser = true; };
in { # in {
prowlarr = base // { group = "piracy"; }; # # prowlarr = base // { group = "piracy"; };
kavita = base // { # # kavita = base // {
group = "kavita"; # # group = "kavita";
extraGroups = [ "piracy" ]; # # extraGroups = [ "piracy" ];
}; # # };
nextcloud = base // { # # nextcloud = base // {
extraGroups = [ "render" ]; # # extraGroups = [ "render" ];
packages = (with pkgs; [ # # packages = (with pkgs; [
nodejs # # nodejs
(python3.withPackages (ps: with ps; [ tensorflow ])) # # (python3.withPackages (ps: with ps; [ tensorflow ]))
perl # # perl
(perlPackages.buildPerlPackage rec { # # (perlPackages.buildPerlPackage rec {
pname = "Image-ExifTool"; # # pname = "Image-ExifTool";
version = "12.70"; # # version = "12.70";
src = fetchurl { # # src = fetchurl {
url = "https://exiftool.org/Image-ExifTool-${version}.tar.gz"; # # url = "https://exiftool.org/Image-ExifTool-${version}.tar.gz";
hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4="; # # hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4=";
}; # # };
}) # # })
]); # # ]);
}; # # };
}; # };
services = let services = let
base = { base = {
enable = true; enable = true;
group = "piracy"; group = "piracy";
}; };
in { in {
sonarr = base // { package = pkgs.sonarr; }; # sonarr = base // { package = pkgs.sonarr; };
radarr = base // { package = pkgs.radarr; }; # radarr = base // { package = pkgs.radarr; };
bazarr = base // { }; # bazarr = base // { };
jellyfin = base // { }; # jellyfin = base // { };
prowlarr.enable = true; # prowlarr.enable = true;
microbin = { microbin = {
enable = true; enable = true;
settings = { settings = {
@ -92,16 +92,16 @@ in {
MICROBIN_ENCRYPTION_SERVER_SIDE = true; MICROBIN_ENCRYPTION_SERVER_SIDE = true;
}; };
}; };
audiobookshelf = { # audiobookshelf = {
enable = true; # enable = true;
group = "piracy"; # group = "piracy";
port = 5687; # port = 5687;
}; # };
paperless = { paperless = {
enable = true; enable = true;
address = "0.0.0.0"; address = "0.0.0.0";
consumptionDirIsPublic = true; consumptionDirIsPublic = true;
consumptionDir = "/mnt/pool/home/Scans"; consumptionDir = "/home/jawz/Backups/Scans";
extraConfig = { extraConfig = {
PAPERLESS_DBENGINE = "postgress"; PAPERLESS_DBENGINE = "postgress";
PAPERLESS_DBNAME = "paperless"; PAPERLESS_DBNAME = "paperless";
@ -134,76 +134,80 @@ in {
LOG_LEVEL = "warn"; LOG_LEVEL = "warn";
}; };
}; };
kavita = { # kavita = {
enable = true; # enable = true;
tokenKeyFile = "${pkgs.writeText "kavitaToken" # tokenKeyFile = "${pkgs.writeText "kavitaToken"
"Au002BRkRxBjlQrmWSuXWTGUcpXZjzMo2nJ0Z4g4OZ1S4c2zp6oaesGUXzKp2mhvOwjju002BNoURG3CRIE2qnGybvOgAlDxAZCPBzSNRcx6RJ1lFRgvI8wQR6Nd5ivYX0RMo4S8yOH8XIDhzN6vNo31rCjyv2IycX0JqiJPIovfbvXn9Y="}"; # "Au002BRkRxBjlQrmWSuXWTGUcpXZjzMo2nJ0Z4g4OZ1S4c2zp6oaesGUXzKp2mhvOwjju002BNoURG3CRIE2qnGybvOgAlDxAZCPBzSNRcx6RJ1lFRgvI8wQR6Nd5ivYX0RMo4S8yOH8XIDhzN6vNo31rCjyv2IycX0JqiJPIovfbvXn9Y="}";
}; # };
nextcloud = { # nextcloud = {
enable = true; # enable = true;
https = true; # https = true;
package = pkgs.nextcloud27; # package = pkgs.nextcloud27;
appstoreEnable = true; # appstoreEnable = true;
configureRedis = true; # configureRedis = true;
extraAppsEnable = true; # extraAppsEnable = true;
enableImagemagick = true; # enableImagemagick = true;
maxUploadSize = "16G"; # maxUploadSize = "16G";
hostName = "cloud.servidos.lat"; # hostName = "cloud.servidos.lat";
config = { # config = {
adminpassFile = "${pkgs.writeText "adminpass" # adminpassFile = "${pkgs.writeText "adminpass"
"Overlying-Hatchback-Charting-Encounter-Deface-Gallantly7"}"; # "Overlying-Hatchback-Charting-Encounter-Deface-Gallantly7"}";
overwriteProtocol = "https"; # overwriteProtocol = "https";
defaultPhoneRegion = "MX"; # defaultPhoneRegion = "MX";
dbtype = "pgsql"; # dbtype = "pgsql";
dbhost = postgresSocket; # dbhost = postgresSocket;
dbtableprefix = "oc_"; # dbtableprefix = "oc_";
dbname = "nextcloud"; # dbname = "nextcloud";
trustedProxies = [ "nginx" ]; # trustedProxies = [ "nginx" ];
extraTrustedDomains = [ "cloud.rotehaare.art" "danilo-reyes.com" ]; # extraTrustedDomains = [ "cloud.rotehaare.art" "danilo-reyes.com" ];
}; # };
phpOptions = { # phpOptions = {
catch_workers_output = "yes"; # catch_workers_output = "yes";
display_errors = "stderr"; # display_errors = "stderr";
error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT"; # error_reporting = "E_ALL & ~E_DEPRECATED & ~E_STRICT";
expose_php = "Off"; # expose_php = "Off";
"opcache.enable_cli" = "1"; # "opcache.enable_cli" = "1";
"opcache.fast_shutdown" = "1"; # "opcache.fast_shutdown" = "1";
"opcache.interned_strings_buffer" = "16"; # "opcache.interned_strings_buffer" = "16";
"opcache.jit" = "1255"; # "opcache.jit" = "1255";
"opcache.jit_buffer_size" = "256M"; # "opcache.jit_buffer_size" = "256M";
"opcache.max_accelerated_files" = "10000"; # "opcache.max_accelerated_files" = "10000";
"opcache.huge_code_pages" = "1"; # "opcache.huge_code_pages" = "1";
"opcache.enable_file_override" = "1"; # "opcache.enable_file_override" = "1";
"opcache.memory_consumption" = "128"; # "opcache.memory_consumption" = "128";
"opcache.revalidate_freq" = "60"; # "opcache.revalidate_freq" = "60";
"opcache.save_comments" = "1"; # "opcache.save_comments" = "1";
"opcache.validate_timestamps" = "0"; # "opcache.validate_timestamps" = "0";
"openssl.cafile" = "/etc/ssl/certs/ca-certificates.crt"; # "openssl.cafile" = "/etc/ssl/certs/ca-certificates.crt";
short_open_tag = "Off"; # short_open_tag = "Off";
}; # };
extraOptions = { # extraOptions = {
"allow_local_remote_servers" = true; # "allow_local_remote_servers" = true;
mail_smtpmode = "sendmail"; # mail_smtpmode = "sendmail";
mail_sendmailmode = "pipe"; # mail_sendmailmode = "pipe";
"installed" = true; # "installed" = true;
"memories.exiftool" = "/etc/profiles/per-user/nextcloud/bin/exiftool"; # "memories.exiftool" = "/etc/profiles/per-user/nextcloud/bin/exiftool";
enabledPreviewProviders = [ # enabledPreviewProviders = [
"OC\\Preview\\Image" # "OC\\Preview\\Image"
"OC\\Preview\\HEIC" # "OC\\Preview\\HEIC"
"OC\\Preview\\TIFF" # "OC\\Preview\\TIFF"
"OC\\Preview\\MKV" # "OC\\Preview\\MKV"
"OC\\Preview\\MP4" # "OC\\Preview\\MP4"
"OC\\Preview\\AVI" # "OC\\Preview\\AVI"
"OC\\Preview\\Movie" # "OC\\Preview\\Movie"
]; # ];
}; # };
phpExtraExtensions = all: [ all.pdlib all.bz2 ]; # phpExtraExtensions = all: [ all.pdlib all.bz2 ];
}; # };
postgresql = { postgresql = {
enable = true; enable = true;
ensureDatabases = [ "paperless" "nextcloud" "ryot" "vaultwarden" ]; ensureDatabases = [ "jawz" "paperless" "nextcloud" "ryot" "vaultwarden" ];
package = pkgs.postgresql_16; package = pkgs.postgresql_16;
ensureUsers = [ ensureUsers = [
{
name = "jawz";
ensureDBOwnership = true;
}
{ {
name = "nextcloud"; name = "nextcloud";
ensureDBOwnership = true; ensureDBOwnership = true;
@ -245,12 +249,12 @@ in {
}; };
}; };
timers = { timers = {
nextcloud-cronjob = { # nextcloud-cronjob = {
enable = true; # enable = true;
description = "Runs various nextcloud-related cronjobs"; # description = "Runs various nextcloud-related cronjobs";
wantedBy = [ "timers.target" ]; # wantedBy = [ "timers.target" ];
timerConfig = { OnCalendar = "*:0/10"; }; # timerConfig = { OnCalendar = "*:0/10"; };
}; # };
}; };
user.services = { user.services = {
update-dns = let update-dns = let