diff --git a/boxes/serverpc/configuration.nix b/boxes/serverpc/configuration.nix index 2384d08..543c1eb 100644 --- a/boxes/serverpc/configuration.nix +++ b/boxes/serverpc/configuration.nix @@ -18,6 +18,7 @@ ../../common/systemModules/sshd.nix ../../common/systemModules/nginx.nix ../../common/systemModules/tailscaleServer.nix + ../../common/systemModules/jellyfin.nix # USERS ../../common/users/meyer-server ]; diff --git a/boxes/serverpc/hardware-configuration.nix b/boxes/serverpc/hardware-configuration.nix index 0d178af..08fb7c9 100644 --- a/boxes/serverpc/hardware-configuration.nix +++ b/boxes/serverpc/hardware-configuration.nix @@ -23,6 +23,12 @@ fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; + fileSystems = { + "/storage" = { + device = "/dev/disk/by-uuid/6a0deece-f671-47da-9c18-c0858613520c"; + fsType = "ext4"; + }; + }; swapDevices = [ ]; diff --git a/common/systemModules/jellyfin.nix b/common/systemModules/jellyfin.nix new file mode 100644 index 0000000..9ade7ab --- /dev/null +++ b/common/systemModules/jellyfin.nix @@ -0,0 +1,36 @@ +{config, ...}: { + users = { + groups = { + media = { + gid = 1002; + }; + }; + }; + services = { + jellyfin = { + dataDir = "${config.fileSystems."/storage".mountPoint}/jfData/"; + group = "media"; + enable = true; + }; + }; + services = { + nginx = { + virtualHosts = { + "jf.sadan.zip" = { + forceSSL = true; + useACMEHost = "sadan.zip"; + locations = { + "/" = { + proxyPass = "http://localhost:8096"; + extraConfig = '' + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + ''; + }; + }; + }; + }; + }; + }; +} diff --git a/common/systemModules/nginx.nix b/common/systemModules/nginx.nix index 908d2bc..e741983 100644 --- a/common/systemModules/nginx.nix +++ b/common/systemModules/nginx.nix @@ -4,10 +4,10 @@ nginx = { enable = true; logError = "syslog:server=unix:/dev/log warn"; - recommendedTlsSettings = true; - recommendedGzipSettings = true; - recommendedProxySettings = true; - recommendedOptimisation = true; +# recommendedTlsSettings = true; +# recommendedGzipSettings = true; +# recommendedProxySettings = true; +# recommendedOptimisation = true; resolver = { addresses = [ "1.0.0.1"