Add Jellyfin. 73
This commit is contained in:
parent
28bcb88d50
commit
ce6ffd9ee7
|
@ -19,6 +19,7 @@
|
||||||
system = {
|
system = {
|
||||||
desktop.enable = false;
|
desktop.enable = false;
|
||||||
server.enable = true;
|
server.enable = true;
|
||||||
|
fileserver.enable = true;
|
||||||
socials.enable = true;
|
socials.enable = true;
|
||||||
wireless.enable = false;
|
wireless.enable = false;
|
||||||
wireguard.server.enable = true;
|
wireguard.server.enable = true;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./jellyfin
|
||||||
./liquidsoap
|
./liquidsoap
|
||||||
./nextcloud
|
./nextcloud
|
||||||
./nginx
|
./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 = [
|
imports = [
|
||||||
./acme
|
./acme
|
||||||
./ddclient
|
./ddclient
|
||||||
|
./fileserver
|
||||||
./forgejo
|
./forgejo
|
||||||
./icecast
|
./icecast
|
||||||
./mailserver
|
./mailserver
|
||||||
./minecraft
|
./minecraft
|
||||||
./mysql
|
./mysql
|
||||||
./nextcloud
|
|
||||||
./nfs
|
|
||||||
./nginx
|
./nginx
|
||||||
./social
|
./social
|
||||||
./transmission
|
./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 = {
|
services.nextcloud = {
|
||||||
enable = config.system.server.enable;
|
enable = config.system.fileserver.enable;
|
||||||
package = pkgs.nextcloud30;
|
package = pkgs.nextcloud30;
|
||||||
hostName = "cloud.${config.domains.p2}";
|
hostName = "cloud.${config.domains.p2}";
|
||||||
datadir = "/mnt/nextcloud";
|
datadir = "/mnt/nextcloud";
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.nfs.server = {
|
services.nfs.server = {
|
||||||
enable = config.system.server.enable;
|
enable = config.system.fileserver.enable;
|
||||||
exports = ''
|
exports = ''
|
||||||
/export/KittyNFS/Files *(rw,sync,no_subtree_check)
|
/export/KittyNFS/Files *(rw,sync,no_subtree_check)
|
||||||
/export/KittyNFS/Media *(rw,sync,no_subtree_check)
|
/export/KittyNFS/Media *(rw,sync,no_subtree_check)
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
services.icecast = {
|
services.icecast = {
|
||||||
enable = config.system.server.enable;
|
enable = config.system.server.enable;
|
||||||
listen.port = 265;
|
listen.port = 73;
|
||||||
hostname = "radio.${config.domains.p2}";
|
hostname = "radio.${config.domains.p2}";
|
||||||
admin = {
|
admin = {
|
||||||
user = "${config.sysusers.main}";
|
user = "${config.sysusers.main}";
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
output.icecast(
|
output.icecast(
|
||||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=265,
|
port=${toString config.services.icecast.listen.port},
|
||||||
password="${config.secrets.castSourcePass}",
|
password="${config.secrets.castSourcePass}",
|
||||||
encoding = "UTF-8",
|
encoding = "UTF-8",
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.services.icecast.enable {
|
config = lib.mkIf config.services.icecast.enable {
|
||||||
services.liquidsoap.streams = lib.mkIf config.services.icecast.enable {
|
services.liquidsoap.streams = {
|
||||||
jimscrapped = pkgs.writeText "jimscrapped" ''
|
jimscrapped = pkgs.writeText "jimscrapped" ''
|
||||||
settings.log.stdout.set(true)
|
settings.log.stdout.set(true)
|
||||||
settings.init.allow_root.set(true)
|
settings.init.allow_root.set(true)
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
output.icecast(
|
output.icecast(
|
||||||
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
|
||||||
host="127.0.0.1",
|
host="127.0.0.1",
|
||||||
port=265,
|
port=${toString config.services.icecast.listen.port},
|
||||||
password="${config.secrets.castSourcePass}",
|
password="${config.secrets.castSourcePass}",
|
||||||
encoding = "UTF-8",
|
encoding = "UTF-8",
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:265";
|
proxyPass = "http://127.0.0.1:73";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue