Add Jellyfin. 73
This commit is contained in:
parent
28bcb88d50
commit
ce6ffd9ee7
|
@ -19,6 +19,7 @@
|
|||
system = {
|
||||
desktop.enable = false;
|
||||
server.enable = true;
|
||||
fileserver.enable = true;
|
||||
socials.enable = true;
|
||||
wireless.enable = false;
|
||||
wireguard.server.enable = true;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./jellyfin
|
||||
./liquidsoap
|
||||
./nextcloud
|
||||
./nginx
|
||||
|
|
12
modules/system/accounts/users/system/jellyfin/default.nix
Normal file
12
modules/system/accounts/users/system/jellyfin/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ ... }:
|
||||
{
|
||||
users = {
|
||||
users.jellyfin = {
|
||||
group = "jellyfin";
|
||||
extraGroups = [ "nfsShare" ];
|
||||
isSystemUser = true;
|
||||
uid = 983;
|
||||
};
|
||||
groups.jellyfin = {};
|
||||
};
|
||||
}
|
|
@ -3,13 +3,12 @@
|
|||
imports = [
|
||||
./acme
|
||||
./ddclient
|
||||
./fileserver
|
||||
./forgejo
|
||||
./icecast
|
||||
./mailserver
|
||||
./minecraft
|
||||
./mysql
|
||||
./nextcloud
|
||||
./nfs
|
||||
./nginx
|
||||
./social
|
||||
./transmission
|
||||
|
|
13
modules/system/services/server/fileserver/default.nix
Normal file
13
modules/system/services/server/fileserver/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.system.fileserver.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./jellyfin
|
||||
./nextcloud
|
||||
./nfs
|
||||
];
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
|
||||
services.jellyfin.enable = config.system.fileserver.enable;
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
|
@ -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)
|
|
@ -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}";
|
||||
|
|
|
@ -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",
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue