diff --git a/config/nas.nix b/config/nas.nix index 34cab857..7797ae9e 100644 --- a/config/nas.nix +++ b/config/nas.nix @@ -32,6 +32,7 @@ ./services/prometheus.nix ./services/yiff-stash.nix ./services/reverse-proxy.nix + ./services/jellyfin.nix ]; hardware.cpu.amd.updateMicrocode = true; @@ -173,4 +174,21 @@ device = "/dev/sdc3"; } ]; + + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; } diff --git a/config/services/jellyfin.nix b/config/services/jellyfin.nix new file mode 100644 index 00000000..13b8a8c6 --- /dev/null +++ b/config/services/jellyfin.nix @@ -0,0 +1,20 @@ +{pkgs, ...}: { + services.jellyfin.enable = true; + environment.systemPackages = [ + pkgs.jellyfin + pkgs.jellyfin-web + pkgs.jellyfin-ffmpeg + ]; + services.caddy.virtualHosts."jellyfin.int.chir.rs" = { + useACMEHost = "int.chir.rs"; + logFormat = pkgs.lib.mkForce ""; + extraConfig = '' + import baseConfig + + reverse_proxy { + to http://localhost:8096 + trusted_proxies private_ranges + } + ''; + }; +} diff --git a/zones/int.chir.rs.nix b/zones/int.chir.rs.nix index f0b95dc0..a5f5a18b 100644 --- a/zones/int.chir.rs.nix +++ b/zones/int.chir.rs.nix @@ -15,7 +15,7 @@ in { SOA = { nameServer = "ns1.chir.rs."; adminEmail = "lotte@chir.rs"; - serial = 31; + serial = 32; }; NS = [ "ns1.chir.rs." @@ -238,6 +238,7 @@ in { mautrix-telegram.CNAME = [(ttl zoneTTL (cname "instance-20221213-1915"))]; mautrix-whatsapp.CNAME = [(ttl zoneTTL (cname "instance-20221213-1915"))]; weblate.CNAME = [(ttl zoneTTL (cname "nas"))]; + jellyfin.CNAME = [(ttl zoneTTL (cname "nas"))]; _acme-challenge = delegateTo [ "ns1.chir.rs." "ns2.chir.rs."