test: setting up nas structure

This commit is contained in:
Nick 2025-12-09 00:52:21 -06:00
parent 4225970826
commit a92229390e
36 changed files with 275 additions and 1039 deletions

View file

@ -2,7 +2,6 @@
let
inherit (moduleFunctions.instancesFunctions)
sslPath
sopsPath
secretPath
;
@ -12,13 +11,16 @@ in
{
label = label;
name = name;
paths = {
path0 = sslPath;
};
secretPaths = {
path0 = secretPath;
};
sops = {
path0 = "${sopsPath}/${name}";
interfaces = {
interface0 = {
paths = {
mntPaths = {
path0 = sslPath;
};
secretPaths = {
path0 = "${secretPath}/${name}";
};
};
};
};
}

View file

@ -2,37 +2,49 @@
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
mntPath
sslPath
sopsPath
secretPath
;
audiobookshelfLabel = "Audiobookshelf";
audiobookshelfName = "audiobookshelf";
audiobookshelfSubdomain = "books";
audiobookshelfDomain = "${audiobookshelfSubdomain}.${domain0}";
label = "Audiobookshelf";
name = "audiobookshelf";
subdomain = "books";
in
{
label = audiobookshelfLabel;
name = audiobookshelfName;
label = label;
name = name;
short = "Books";
sops = {
path0 = "${sopsPath}/${audiobookshelfName}";
};
domains = {
url0 = audiobookshelfDomain;
};
subdomain = audiobookshelfSubdomain;
tags = [
name
"audiobooks"
"reading"
];
paths = {
path0 = "${servicePath}/${audiobookshelfLabel}";
};
ports = {
port0 = 8000;
};
ssl = {
cert = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${audiobookshelfSubdomain}.${domain0}/key.pem";
interfaces = {
interface0 =
let
domain = "${subdomain}.${domain0}";
secret = "${secretPath}/${name}";
ssl = "${sslPath}/${domain}";
in
{
domain = domain;
subdomain = subdomain;
paths = {
mntPaths = {
path0 = "${mntPath}/${name}";
};
secretPaths = {
path0 = secret;
};
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
};
};
};
}

View file

@ -1,7 +1,7 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
dummy
;
caddyLabel = "Caddy";
@ -10,9 +10,7 @@ in
{
label = caddyLabel;
name = caddyName;
sops = {
path0 = "${sopsPath}/${caddyName}";
};
short = dummy;
ports = {
port0 = 80;
port1 = 443;

View file

@ -8,8 +8,6 @@ let
;
label = "ComfyUI";
name = "comfyui";
domain = "${name}.${domain0}";
ssl = "${sslPath}/${domain}";
in
{
label = label;
@ -20,24 +18,33 @@ in
"comfy"
"ui"
];
domains = {
url0 = domain;
};
ports = {
port0 = 8188;
};
varPaths = {
path0 = "${varPath}/${name}";
};
mntPaths = {
path0 = "${mntPath}/${name}";
};
secretPaths = {
path0 = "/run/secrets";
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
interfaces = {
interface0 =
let
domain = "${name}.${domain0}";
ssl = "${sslPath}/${domain}";
in
{
domain = domain;
paths = {
varPaths = {
path0 = "${varPath}/${name}";
};
mntPaths = {
path0 = "${mntPath}/${name}";
};
secretPaths = {
path0 = "/run/secrets";
};
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
};
};
};
}

View file

@ -35,12 +35,12 @@ in
{
microvm = {
id = "vm-${name}";
mac = "02:00:00:00:54:04";
mac = "02:00:00:00:60:70";
idUser = "vmuser-firefly";
macUser = "02:00:00:00:00:04";
ip = "192.168.50.114";
macUser = "02:00:00:00:00:70";
ip = "192.168.50.70";
gate = "192.168.50.1";
ssh = 2204;
ssh = 2570;
};
email = "noreply@${domain0}";
domain = domain;

View file

@ -4,42 +4,50 @@ let
domain0
servicePath
sslPath
sopsPath
secretPath
;
label = "Glance";
name = "glance";
subdomain = "dashboard";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = label;
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
"glance"
"dashboard"
"weather"
"podcasts"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 3434;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain0}/key.pem";
interfaces = {
interface0 =
let
subdomain = "dashboard";
domain = "${subdomain}.${domain0}";
secret = "${secretPath}/${name}";
ssl = "${sslPath}/${domain}";
in
{
domain = domain;
subdomain = subdomain;
email = "noreply@${domain0}";
paths = {
mntPaths = {
path0 = "${servicePath}/${label}";
};
secretPath = {
path0 = secret;
};
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
};
};
};
}

View file

@ -1,27 +0,0 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
servicePath
sopsPath
;
label = "Matrix";
name = "matrix";
in
{
label = label;
name = name;
short = label;
sops = {
path0 = "${sopsPath}/${name}";
};
subdomain = name;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "";
path2 = "";
};
}

View file

@ -35,12 +35,12 @@ in
subdomain = short;
microvm = {
id = "vm-${short}";
mac = "02:00:00:00:56:09";
mac = "02:00:00:00:66:76";
idUser = "vmuser-${short}";
macUser = "02:00:00:00:00:09";
ip = "192.168.50.119";
macUser = "02:00:00:00:00:76";
ip = "192.168.50.76";
gate = "192.168.50.1";
ssh = 2209;
ssh = 2576;
};
ssl = {
path = ssl;

View file

@ -1,41 +0,0 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain1
servicePath
sslPath
sopsPath
;
label = "Owncast";
name = "owncast";
subdomain = "stream";
domain = "${subdomain}.${domain1}";
in
{
label = label;
name = name;
short = "Cast";
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "/mnt/media/storage/${name}";
};
ports = {
port0 = 9454;
port1 = 1935;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain1}/key.pem";
};
}

View file

@ -2,36 +2,24 @@
let
inherit (moduleFunctions.instancesFunctions)
domain1
servicePath
mntPath
sslPath
sopsPath
;
label = "PeerTube";
name = "peertube";
subdomain = "video";
domain = "${subdomain}.${domain1}";
in
{
label = label;
name = name;
short = "Peer";
email = {
address0 = "noreply@${domain1}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
email = "noreply@${domain1}";
tags = [
name
"video"
"peer"
"fediverse"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 9000; # HTTP
port1 = 1935;
@ -39,8 +27,30 @@ in
port3 = 5432;
port4 = 52800;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain1}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain1}/key.pem";
interfaces = {
interface0 =
let
subdomain = "video";
domain = "${subdomain}.${domain1}";
secret = "${sslPath}/${name}";
ssl = "${sslPath}/${domain}";
in
{
domain = domain;
subdomain = subdomain;
paths = {
mntPaths = {
path0 = "${mntPath}/${name}";
};
secretPath = {
path0 = secret;
};
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
};
};
};
}

View file

@ -35,12 +35,12 @@ in
subdomain = short;
microvm = {
id = "vm-${short}";
mac = "02:00:00:00:56:11";
mac = "02:00:00:00:69:79";
idUser = "vmuser-${short}";
macUser = "02:00:00:00:00:11";
ip = "192.168.50.121";
macUser = "02:00:00:00:00:79";
ip = "192.168.50.79";
gate = "192.168.50.1";
ssh = 2211;
ssh = 2579;
};
ssl = {
path = ssl;

View file

@ -2,43 +2,51 @@
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
mntPath
secretPath
sslPath
sopsPath
;
label = "SearXNG";
name = "searx";
subdomain = "search";
domain = "${subdomain}.${domain0}";
in
{
label = label;
name = name;
short = "Sear";
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = subdomain;
tags = [
"search"
"sear"
"searx"
];
paths = {
path0 = "${servicePath}/${label}";
};
ports = {
port0 = 8888;
};
ssl = {
cert = "${sslPath}/${subdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${subdomain}.${domain0}/key.pem";
interfaces = {
interface0 =
let
subdomain = "search";
domain = "${subdomain}.${domain0}";
ssl = "${sslPath}/${domain}";
secret = "${secretPath}/${name}";
in
{
domain = domain;
email = "noreply@${domain0}";
subdomain = subdomain;
paths = {
mntPaths = {
path0 = "${mntPath}/${name}";
};
secretPaths = {
path0 = secret;
};
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
};
};
};
}

View file

@ -38,12 +38,12 @@ in
subdomain = name;
microvm = {
id = "vm-${id}";
mac = "02:00:00:00:56:10";
mac = "02:00:00:00:75:85";
idUser = "vmuser-${id}";
macUser = "02:00:00:00:00:10";
ip = "192.168.50.120";
macUser = "02:00:00:00:00:85";
ip = "192.168.50.85";
gate = "192.168.50.1";
ssh = 2210;
ssh = 2585;
};
ssl = {
cert = "${ssl}/fullchain.pem";