Add Jellyfin. 73

This commit is contained in:
Jimbo 2025-01-16 00:41:00 -05:00
parent 28bcb88d50
commit ce6ffd9ee7
15 changed files with 54 additions and 9 deletions

View file

@ -19,6 +19,7 @@
system = {
desktop.enable = false;
server.enable = true;
fileserver.enable = true;
socials.enable = true;
wireless.enable = false;
wireguard.server.enable = true;

View file

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./jellyfin
./liquidsoap
./nextcloud
./nginx

View file

@ -0,0 +1,12 @@
{ ... }:
{
users = {
users.jellyfin = {
group = "jellyfin";
extraGroups = [ "nfsShare" ];
isSystemUser = true;
uid = 983;
};
groups.jellyfin = {};
};
}

View file

@ -3,13 +3,12 @@
imports = [
./acme
./ddclient
./fileserver
./forgejo
./icecast
./mailserver
./minecraft
./mysql
./nextcloud
./nfs
./nginx
./social
./transmission

View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
options.system.fileserver.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
imports = [
./jellyfin
./nextcloud
./nfs
];
}

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
imports = [
./nginx
];
services.jellyfin.enable = config.system.fileserver.enable;
}

View file

@ -0,0 +1,11 @@
{ lib, config, ... }:
{
services.nginx.virtualHosts."jelly.${config.domains.p2}" = lib.mkIf config.services.forgejo.enable {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8096";
proxyWebsockets = true;
};
};
}

View file

@ -6,7 +6,7 @@
];
services.nextcloud = {
enable = config.system.server.enable;
enable = config.system.fileserver.enable;
package = pkgs.nextcloud30;
hostName = "cloud.${config.domains.p2}";
datadir = "/mnt/nextcloud";

View file

@ -1,7 +1,7 @@
{ config, ... }:
{
services.nfs.server = {
enable = config.system.server.enable;
enable = config.system.fileserver.enable;
exports = ''
/export/KittyNFS/Files *(rw,sync,no_subtree_check)
/export/KittyNFS/Media *(rw,sync,no_subtree_check)

View file

@ -7,7 +7,7 @@
services.icecast = {
enable = config.system.server.enable;
listen.port = 265;
listen.port = 73;
hostname = "radio.${config.domains.p2}";
admin = {
user = "${config.sysusers.main}";

View file

@ -13,7 +13,7 @@
output.icecast(
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
host="127.0.0.1",
port=265,
port=${toString config.services.icecast.listen.port},
password="${config.secrets.castSourcePass}",
encoding = "UTF-8",

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }:
{
config = lib.mkIf config.services.icecast.enable {
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
services.liquidsoap.streams = {
jimscrapped = pkgs.writeText "jimscrapped" ''
settings.log.stdout.set(true)
settings.init.allow_root.set(true)
@ -13,7 +13,7 @@
output.icecast(
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
host="127.0.0.1",
port=265,
port=${toString config.services.icecast.listen.port},
password="${config.secrets.castSourcePass}",
encoding = "UTF-8",

View file

@ -4,7 +4,7 @@
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:265";
proxyPass = "http://127.0.0.1:73";
proxyWebsockets = true;
};
};