challenger: start migrating from voyager. Add nginx. Add jellyfin.

This commit is contained in:
2024-07-03 20:51:18 +02:00
parent 5203e82efa
commit ed08b6a0e4
5 changed files with 18 additions and 12 deletions

View File

@@ -12,10 +12,8 @@
./services/calibre.nix
./services/fancontrol.nix
./services/jellyfin.nix
./services/komga.nix
./services/nextcloud.nix
./services/nginx
./services/podgrab.nix
./services/postgres.nix
./services/snappymail.nix

View File

@@ -1,49 +0,0 @@
{ config, pkgs, lib, ... }:
{
# Jellyfin - Media Streaming platform
services.jellyfin.enable = true;
users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ];
systemd.services.jellyfin.serviceConfig = {
DeviceAllow = lib.mkForce [ "/dev/dri/card0" ];
};
services.nginx.virtualHosts."jellyfin.home.feal.no" = {
serverAliases = [ "jf.feal.no" ];
locations = {
"= /" = {
return = "302 http://$host/web/";
};
"/" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = ''
proxy_buffering off;
'';
};
"/socket" = {
proxyPass = "http://127.0.0.1:8096";
proxyWebsockets = true;
};
};
extraConfig = ''
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always;
'';
};
fileSystems."/tank/media/jellyfin/Music" = {
depends = [
"/tank/media/music"
"/tank/media/jellyfin"
];
options = [ "bind" ];
device = "/tank/media/music";
};
}

View File

@@ -1,22 +0,0 @@
{ config, values, ... }:
{
services.nginx = {
enable = true;
enableReload = true;
clientMaxBodySize = "100m";
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
/* security.acme = { */
/* acceptTerms = true; */
/* email = "felix@albrigtsen.it"; */
/* }; */
}