feat: init

This commit is contained in:
Nick 2025-03-29 23:08:26 -05:00
commit 96c6f790fc
804 changed files with 33411 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
sslPath
sopsPath
;
acmeLabel = "Acme";
acmeName = "acme";
in
{
label = acmeLabel;
name = acmeName;
paths = {
path0 = sslPath;
};
sops = {
path0 = "${sopsPath}/${acmeName}";
};
}

View file

@ -0,0 +1,30 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
audiobookshelfLabel
audiobookshelfName
domain0
servicePath
sslPath
sopsPath
;
audiobookshelfSubdomain = "books";
in
{
label = audiobookshelfLabel;
name = audiobookshelfName;
sops = {
path0 = "${sopsPath}/${audiobookshelfName}";
};
subdomain = audiobookshelfSubdomain;
paths = {
path0 = "${servicePath}/${audiobookshelfLabel}";
};
ports = {
port0 = 8000;
};
ssl = {
cert = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,20 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
sopsPath
;
caddyLabel = "Caddy";
caddyName = "caddy";
in
{
label = caddyLabel;
name = caddyName;
sops = {
path0 = "${sopsPath}/${caddyName}";
};
ports = {
port0 = 80;
port1 = 443;
};
}

View file

@ -0,0 +1,34 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
forgejoLabel = "Forgejo";
forgejoName = "forgejo";
forgejoSubdomain = "source";
in
{
label = forgejoLabel;
name = forgejoName;
email = {
address0 = "noreply@${domain3}";
};
sops = {
path0 = "${sopsPath}/${forgejoName}";
};
subdomain = forgejoSubdomain;
paths = {
path0 = "${servicePath}/${forgejoLabel}";
};
ports = {
port0 = 3033;
};
ssl = {
cert = "${sslPath}/${forgejoSubdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${forgejoSubdomain}.${domain3}/key.pem";
};
}

View file

@ -0,0 +1,31 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
jellyfinLabel
jellyfinName
servicePath
sslPath
sopsPath
;
in
{
label = jellyfinLabel;
name = jellyfinName;
sops = {
path0 = "${sopsPath}/${jellyfinName}";
};
subdomain = jellyfinName;
paths = {
path0 = "${servicePath}/${jellyfinLabel}";
};
ports = {
port0 = 5055; # Jellyseer
port1 = 8096; # Jellyfin HTTP
port2 = 8920; # Jellyfin HTTPS
};
ssl = {
cert = "${sslPath}/${jellyfinName}.${domain0}/fullchain.pem";
key = "${sslPath}/${jellyfinName}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,33 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
mastodonLabel = "Mastodon";
mastodonName = "mastodon";
mastodonSubdomain = "social";
in
{
label = mastodonLabel;
name = mastodonName;
email = {
address0 = "noreply@${domain3}";
};
subdomain = mastodonSubdomain;
sops = {
path0 = "${sopsPath}/${mastodonName}";
};
paths = {
path0 = "${servicePath}/${mastodonLabel}";
path1 = "";
path2 = "";
};
ssl = {
cert = "${sslPath}/${mastodonSubdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${mastodonSubdomain}.${domain3}/key.pem";
};
}

View file

@ -0,0 +1,23 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
servicePath
sopsPath
;
matrixLabel = "Matrix";
matrixName = "matrix";
in
{
label = matrixLabel;
name = matrixName;
sops = {
path0 = "${sopsPath}/${matrixName}";
};
subdomain = matrixName;
paths = {
path0 = "${servicePath}/${matrixLabel}";
path1 = "";
path2 = "";
};
}

View file

@ -0,0 +1,30 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
minecraftLabel = "Minecraft";
minecraftName = "minecraft";
in
{
label = minecraftLabel;
name = minecraftName;
sops = {
path0 = "${sopsPath}/${minecraftName}";
};
subdomain = minecraftName;
paths = {
path0 = "${servicePath}/${minecraftLabel}";
};
ports = {
port0 = 43000; # Minecraft (Brix on Nix)
};
ssl = {
cert = "${sslPath}/${minecraftName}.${domain0}/fullchain.pem";
key = "${sslPath}/${minecraftName}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,30 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain1
servicePath
sslPath
sopsPath
;
nextcloudLabel = "Nextcloud";
nextcloudName = "nextcloud";
in
{
label = nextcloudLabel;
name = nextcloudName;
sops = {
path0 = "${sopsPath}/${nextcloudName}";
};
subdomain = nextcloudName;
paths = {
path0 = "${servicePath}/${nextcloudLabel}";
};
ports = {
port0 = 8354; # Nextcloud
};
ssl = {
cert = "${sslPath}/${nextcloudName}.${domain1}/fullchain.pem";
key = "${sslPath}/${nextcloudName}.${domain1}/key.pem";
};
}

View file

@ -0,0 +1,32 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
ollamaLabel = "Ollama";
ollamaName = "ollama";
in
{
label = ollamaLabel;
name = ollamaName;
sops = {
path0 = "${sopsPath}/${ollamaName}";
};
subdomain = ollamaName;
paths = {
path0 = "${servicePath}/${ollamaLabel}";
path1 = "/mnt/media/storage/${ollamaName}";
};
ports = {
port0 = 8088; # Open-WebUI (Ollama Front End)
port1 = 11434; # Ollama API
};
ssl = {
cert = "${sslPath}/${ollamaName}.${domain0}/fullchain.pem";
key = "${sslPath}/${ollamaName}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,33 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain1
servicePath
sslPath
sopsPath
;
owncastLabel = "Owncast";
owncastName = "owncast";
owncastSubdomain = "stream";
in
{
label = owncastLabel;
name = owncastName;
sops = {
path0 = "${sopsPath}/${owncastName}";
};
subdomain = owncastSubdomain;
paths = {
path0 = "${servicePath}/${owncastLabel}";
path1 = "/mnt/media/storage/${owncastName}";
};
ports = {
port0 = 9454;
port1 = 1935;
};
ssl = {
cert = "${sslPath}/${owncastSubdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${owncastSubdomain}.${domain1}/key.pem";
};
}

View file

@ -0,0 +1,38 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
peertubeLabel = "PeerTube";
peertubeName = "peertube";
peertubeSubdomain = "video";
in
{
label = peertubeLabel;
name = peertubeName;
email = {
address0 = "noreply@${domain3}";
};
sops = {
path0 = "${sopsPath}/${peertubeName}";
};
subdomain = peertubeSubdomain;
paths = {
path0 = "${servicePath}/${peertubeLabel}";
};
ports = {
port0 = 9000; # HTTP
port1 = 1935;
port2 = 1936;
port3 = 5432;
port4 = 52800;
};
ssl = {
cert = "${sslPath}/${peertubeSubdomain}.${domain3}/fullchain.pem";
key = "${sslPath}/${peertubeSubdomain}.${domain3}/key.pem";
};
}

View file

@ -0,0 +1,27 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain3
servicePath
sslPath
sopsPath
;
postfixLabel = "Postfix";
postfixName = "postfix";
in
{
label = postfixLabel;
name = postfixName;
sops = {
path0 = "${sopsPath}/${postfixName}";
};
subdomain = postfixName;
paths = {
path0 = "${servicePath}/${postfixLabel}";
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
};
}

View file

@ -0,0 +1,23 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
servicePath
sopsPath
;
postgresLabel = "PostgreSQL";
postgresName = "postgres";
in
{
label = postgresLabel;
name = postgresName;
sops = {
path0 = "${sopsPath}/${postgresName}";
};
paths = {
path0 = "${servicePath}/${postgresLabel}";
};
ports = {
port0 = 5432;
};
}

View file

@ -0,0 +1,21 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
sopsPath
;
sambaLabel = "Samba";
sambaName = "samba";
in
{
label = sambaLabel;
name = sambaName;
sops = {
path0 = "${sopsPath}/${sambaName}";
};
paths = {
};
ports = {
port0 = 445; # Samba
};
}

View file

@ -0,0 +1,34 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
searxLabel = "SearXNG";
searxName = "searx";
searxSubdomain = "search";
in
{
label = searxLabel;
name = searxName;
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${searxName}";
};
subdomain = searxSubdomain;
paths = {
path0 = "${servicePath}/${searxLabel}";
};
ports = {
port0 = 8888;
};
ssl = {
cert = "${sslPath}/${searxSubdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${searxSubdomain}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,13 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
dummy
;
in
{
hostname = "mail.smtp2go.com";
name = dummy;
ports = {
port0 = 2525;
};
}

View file

@ -0,0 +1,28 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
sslPath
sopsPath
;
syncthingLabel = "Syncthing";
syncthingName = "syncthing";
in
{
label = syncthingLabel;
name = syncthingName;
sops = {
path0 = "${sopsPath}/${syncthingName}";
};
subdomain = syncthingName;
ports = {
port0 = 8388; # Syncthing (WebUI)
port1 = 21027; # Syncthing (Discovery)
port2 = 22000; # Syncthing (Transfer)
};
ssl = {
cert = "${sslPath}/${syncthingName}.${domain0}/fullchain.pem";
key = "${sslPath}/${syncthingName}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,19 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
sopsPath
;
synologyLabel = "Synology";
synologyName = "synology";
in
{
label = synologyLabel;
name = synologyName;
sops = {
path0 = "${sopsPath}/${synologyName}";
};
ports = {
port0 = 5001; # Synology HTTPS
};
}

View file

@ -0,0 +1,33 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain3
sslPath
sopsPath
;
upRootNutritionLabel = "upRootNutrition";
upRootNutritionName = "uprootnutrition";
in
{
label = upRootNutritionLabel;
name = upRootNutritionName;
email = {
address0 = "nick@${domain3}";
};
sops = {
path0 = "${sopsPath}/${upRootNutritionName}";
};
paths = {
path0 = "/var/lib/website/dist";
path1 = "";
path2 = "";
};
ports = {
port0 = 1234;
};
ssl = {
cert = "${sslPath}/${domain3}/fullchain.pem";
key = "${sslPath}/${domain3}/key.pem";
};
}

View file

@ -0,0 +1,33 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
vaultwardenLabel = "Vaultwarden";
vaultwardenName = "vaultwarden";
in
{
label = vaultwardenLabel;
name = vaultwardenName;
email = {
address0 = "noreply@${vaultwardenName}.${domain0}";
};
sops = {
path0 = "${sopsPath}/${vaultwardenName}";
};
subdomain = vaultwardenName;
paths = {
path0 = "${servicePath}/${vaultwardenLabel}/BackupDir";
};
ports = {
port0 = 8085; # Vaultwarden WebUI
};
ssl = {
cert = "${sslPath}/${vaultwardenName}.${domain0}/fullchain.pem";
key = "${sslPath}/${vaultwardenName}.${domain0}/key.pem";
};
}

View file

@ -0,0 +1,26 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
domain1
domain2
domain3
;
in
{
domains = {
url0 = domain0;
url1 = domain1;
url2 = domain2;
url3 = domain3;
};
dns = {
provider0 = "namecheap";
};
localhost = {
address0 = "127.0.0.1"; # Local
address1 = "0.0.0.0"; # All
address2 = "192.168.50.1"; # Router
address3 = "192.168.50.0"; # Router
};
}

View file

@ -0,0 +1,39 @@
let
configPath = ./config;
instancesFunctions = {
jellyfinLabel = "Jellyfin";
jellyfinName = "jellyfin";
audiobookshelfLabel = "Audiobookshelf";
audiobookshelfName = "audiobookshelf";
domain0 = "cloudbert.fun";
domain1 = "the-nutrivore.social";
domain2 = "the-nutrivore.com";
domain3 = "uprootnutrition.com";
servicePath = "/mnt/media/NAS1";
sopsPath = "/var/lib/secrets";
sslPath = "/var/lib/acme";
varLib = "/var/lib";
dummy = "";
};
instances = builtins.listToAttrs (
map
(name: {
name = builtins.substring 0 (builtins.stringLength name - 4) name;
value = import (configPath + "/${name}") {
inherit
instancesFunctions
;
};
})
(
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
builtins.attrNames (builtins.readDir configPath)
)
)
);
in
{
instances = instances;
}