Begin the move to the import all, activate by config model

This commit is contained in:
Jimbo 2024-11-04 22:41:38 -05:00
parent 7397b614de
commit 07cb2d67a2
97 changed files with 776 additions and 633 deletions

View file

@ -9,9 +9,9 @@
./minecraft
./misc
./mysql
./nginx
./social
./transmission
./vaultwarden
./webhost
];
}

View file

@ -5,13 +5,11 @@
exports = ''
/export/JimboNFS/Downloads *(rw,sync,no_subtree_check)
/export/JimboNFS/Documents *(rw,sync,no_subtree_check)
/export/JimboNFS/Photos *(rw,sync,no_subtree_check)
/export/JimboNFS/Videos/Random *(rw,sync,no_subtree_check)
/export/JimboNFS/Videos/Media *(rw,sync,no_subtree_check)
/export/JimboNFS/Music/Synced *(rw,sync,no_subtree_check)
/export/JimboNFS/Music/Unsynced *(rw,sync,no_subtree_check)
/export/JimboNFS/Projects *(rw,sync,no_subtree_check)
/export/JimboNFS/School *(rw,sync,no_subtree_check)
/export/JimboNFS/Videos *(rw,sync,no_subtree_check)
/export/JimboNFS/Music *(rw,sync,no_subtree_check)
'';
};
}

View file

@ -1,12 +1,10 @@
{ pkgs, config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
package = pkgs.nextcloud30;
hostName = "cloud.${config.domains.jim1}";
datadir = "/mnt/nextcloud";
https = true;

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ config, ... }:
{
services.nginx.virtualHosts."cloud.${config.domains.jim1}" = {
enableACME = true;

View file

@ -1,8 +1,6 @@
{ config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services = {
photoprism = {

View file

@ -1,8 +1,6 @@
{ config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services = {
forgejo = {

View file

@ -30,6 +30,16 @@
<type>application/ogg</type>
<subtype>vorbis</subtype>
</mount>
<mount type="normal">
<mount-name>/jimscrap.opus</mount-name>
<stream-name>Jimbo's Scrap</stream-name>
<stream-description>Music canned from the main radio.</stream-description>
<stream-url>https://icecast.jimbosfiles.com/jimscrap.opus</stream-url>
<genre>Scrapped</genre>
<type>application/ogg</type>
<subtype>vorbis</subtype>
</mount>
'';
};
}

View file

@ -1,30 +1,7 @@
{ pkgs, config, ... }:
{ ... }:
{
services.liquidsoap.streams = {
jimbops = pkgs.writeText "liquidjim" ''
settings.log.stdout.set(true)
settings.init.allow_root.set(true)
settings.scheduler.fast_queues.set(2)
settings.decoder.file_extensions.mp4.set(["m4a", "m4b", "m4p", "m4v", "m4r", "3gp", "mp4"])
# Define the source with random playlist
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/Synced"))
# Ensure the stream never stops
jimbops_fallback = fallback([jimbops, jimbops])
# Output configuration to Icecast
output.icecast(
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
host="127.0.0.1",
port=265,
password="${config.secrets.castSourcePass}",
public=true,
icy_metadata=["artist", "title"],
mount="jimbops.opus",
encoding = "UTF-8",
jimbops_fallback
)
'';
};
imports = [
./jimbops
./jimscrap
];
}

View file

@ -0,0 +1,29 @@
{ pkgs, config, ... }:
{
services.liquidsoap.streams = {
jimbops = pkgs.writeText "liquidjim" ''
settings.log.stdout.set(true)
settings.init.allow_root.set(true)
settings.scheduler.fast_queues.set(2)
# Define the source with random playlist
jimbops = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/Synced"))
# Ensure the stream never stops
jimbops_fallback = fallback([jimbops, jimbops])
# Output configuration to Icecast
output.icecast(
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
host="127.0.0.1",
port=265,
password="${config.secrets.castSourcePass}",
public=true,
icy_metadata=["artist", "title"],
mount="jimbops.opus",
encoding = "UTF-8",
jimbops_fallback
)
'';
};
}

View file

@ -0,0 +1,29 @@
{ pkgs, config, ... }:
{
services.liquidsoap.streams = {
jimscrap = pkgs.writeText "liquidjim" ''
settings.log.stdout.set(true)
settings.init.allow_root.set(true)
settings.scheduler.fast_queues.set(2)
# Define the source with random playlist
jimscrap = mksafe(playlist(mode='randomize', reload=1, reload_mode="rounds", "/export/JimboNFS/Music/Unsynced"))
# Ensure the stream never stops
jimscrap_fallback = fallback([jimscrap, jimscrap])
# Output configuration to Icecast
output.icecast(
%ffmpeg(format="ogg", %audio(codec="libvorbis", samplerate=48000, b="256k", channels=2)),
host="127.0.0.1",
port=265,
password="${config.secrets.castSourcePass}",
public=true,
icy_metadata=["artist", "title"],
mount="jimscrap.opus",
encoding = "UTF-8",
jimscrap_fallback
)
'';
};
}

View file

@ -1,5 +1,10 @@
{ pkgs, config, ... }:
{
imports = [
./rtmp
./virtualhosts
];
services.nginx = {
enable = true;
recommendedTlsSettings = true;
@ -9,6 +14,7 @@
};
networking.firewall.allowedTCPPorts = [
80 443
80
443
];
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ config, ... }:
{
services.nginx.virtualHosts = {
"${config.domains.jim1}" = {

View file

@ -1,8 +1,6 @@
{ config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services.lemmy = {
enable = true;

View file

@ -1,8 +1,6 @@
{ pkgs, config, ... }:
{ config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
nixpkgs.config.element-web.conf = {
default_server_config = {

View file

@ -1,8 +1,6 @@
{ config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services = {
coturn = {

View file

@ -6,8 +6,8 @@
SYNCV3_SERVER = "https://matrix.${config.domains.jim1}";
SYNCV3_BINDADDR = "0.0.0.0:8009";
};
environmentFile = "${pkgs.writeText "matrixsecret" ''
environmentFile = pkgs.writeText "matrixsecret" ''
SYNCV3_SECRET=${config.secrets.matrixSecret}
''}";
'';
};
}

View file

@ -1,8 +1,6 @@
{ ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services.owncast = {
enable = true;

View file

@ -1,8 +1,6 @@
{ pkgs, config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services.transmission = {
enable = true;

View file

@ -1,8 +1,6 @@
{ config, ... }:
{
imports = [
./nginx
];
imports = [ ./nginx ];
services.vaultwarden = {
enable = true;

View file

@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./nginx
./virtualhosts
];
}