Added jellyfin setup

This commit is contained in:
ari committed 2024-08-20 20:57:29 -04:00
1 parent 25c575b534
commit dc8e0b81d9
5 files changed
+96 -47

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ in
};
};
config = mkIf cfg.enabled {
fileSystems."/mnt/EightTerra/DownloadedTorrents" = {
fileSystems."/torrents" = {
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
+57
View File
@@ -0,0 +1,57 @@
{ config, lib, ... }:
with lib;
let
cfg = config.skyg.nixos.server.services.ai;
openPorts = [
11434
10400
10300
10200
];
in
{
options = {
skyg.nixos.server.services.ai = {
enable = mkEnableOption
"Enable AI Services";
};
};
config = mkIf cfg.enable {
networking.firewall.allowedUDPPorts = openPorts;
networking.firewall.allowedTCPPorts = openPorts;
virtualisation.oci-containers = {
containers = {
ollama = {
autoStart = true;
image = "ollama/ollama";
extraOptions = [ "--gpus" "all" ];
ports = [ "11434:11434" ];
volumes = [ "ollama:/root/.ollama" ];
};
openwakeword = {
autoStart = true;
image = "rhasspy/wyoming-openwakeword";
cmd = [ "--preload-model" "ok_nabu" ];
ports = [ "10400:10400" ];
};
};
};
services.wyoming = {
faster-whisper.servers.main-eng = {
enable = true;
device = "cpu";
model = "medium.en";
language = "en";
uri = "tcp://0.0.0.0:10300";
};
piper.servers.pier = {
enable = true;
uri = "tcp://0.0.0.0:10200";
voice = "en_GB-alan-medium";
};
};
};
}
+2
View File
@@ -4,5 +4,7 @@
./audiobookshelf.nix
./coral-tpu-udev.nix
./exporters.nix
./ai-services.nix
./jellyfin.nix
];
}
+34
View File
@@ -0,0 +1,34 @@
{ config, lib, ... }:
with lib;
let
cfg = config.skyg.nixos.server.services.jellyfin;
in
{
options = {
skyg.nixos.server.services.jellyfin = {
enable = mkEnableOption
"Enable AI Services";
};
};
config = mkIf cfg.enable {
services.jellyfin = {
enable = true;
dataDir = "/mnt/apps/jellyfin/datadir";
configDir = "/mnt/apps/jellyfin/configdir";
openFirewall = true;
};
fileSystems."/mnt/apps/jellyfin" = {
device = "terra1.lab.internal:/mnt/Data/apps/jellyfin";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
};
fileSystems."/family-videos" = {
device = "tnas1.lab.internal:/mnt/EightTerra/FamilyStorage/Video";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
};
};
}