refactor: abstracting out bookmark info

This commit is contained in:
Nick 2025-07-07 18:57:55 -05:00
parent 85117d2dca
commit 77a31e9688
19 changed files with 114 additions and 64 deletions

View file

@ -57,6 +57,7 @@ let
label = stringType;
name = stringType;
hostname = stringType;
tags = listType;
domains = genOptions stringType "url";
dns = genOptions stringType "provider";
localhost = genOptions stringType "address";
@ -241,6 +242,7 @@ in
sopsPath = "/var/lib/secrets";
sslPath = "/var/lib/acme";
varLib = "/var/lib";
synologyName = "synology";
dummy = "";
};

View file

@ -21,6 +21,9 @@ in
url0 = audiobookshelfDomain;
};
subdomain = audiobookshelfSubdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${audiobookshelfLabel}";
};

View file

@ -25,6 +25,11 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"forge"
"git"
];
paths = {
path0 = "${servicePath}/${label}";
};

View file

@ -25,6 +25,12 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
"glance"
"dashboard"
"weather"
"podcasts"
];
paths = {
path0 = "${servicePath}/${label}";
};

View file

@ -19,6 +19,14 @@ in
domains = {
url0 = domain;
};
tags = [
"jelly"
"video"
"streaming"
"movies"
"shows"
"music"
];
subdomain = name;
paths = {
path0 = "${servicePath}/${label}";

View file

@ -22,6 +22,11 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"mast"
"md"
];
sops = {
path0 = "${sopsPath}/${name}";
};

View file

@ -15,6 +15,9 @@ in
path0 = "${sopsPath}/${name}";
};
subdomain = name;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "";

View file

@ -24,6 +24,12 @@ in
url0 = domain;
};
subdomain = name;
tags = [
name
"next"
"cloud"
"calendar"
];
paths = {
path0 = "${servicePath}/${label}";
};

View file

@ -21,6 +21,11 @@ in
url0 = domain;
};
subdomain = name;
tags = [
name
"chat"
"ai"
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "/mnt/media/storage/${name}";

View file

@ -25,6 +25,11 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
name
"opencloud"
"cloud"
];
paths = {
path0 = "${servicePath}/${label}";
};

View file

@ -22,6 +22,9 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
path1 = "/mnt/media/storage/${name}";

View file

@ -25,6 +25,9 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
];
paths = {
path0 = "${servicePath}/${label}";
};

View file

@ -25,6 +25,11 @@ in
url0 = domain;
};
subdomain = subdomain;
tags = [
"search"
"sear"
"searx"
];
paths = {
path0 = "${servicePath}/${label}";
};

View file

@ -4,6 +4,7 @@ let
domain0
sslPath
sopsPath
synologyName
;
label = "Syncthing";
@ -20,6 +21,12 @@ in
url0 = domain;
};
subdomain = name;
tags = [
name
synologyName
"sync"
"thing"
];
ports = {
port0 = 8388; # Syncthing (WebUI)
port1 = 21027; # Syncthing (Discovery)

View file

@ -2,14 +2,20 @@
let
inherit (moduleFunctions.instancesFunctions)
sopsPath
synologyName
;
label = "Synology";
name = "synology";
name = synologyName;
in
{
label = label;
name = name;
tags = [
name
"dsm"
"cloud"
];
sops = {
path0 = "${sopsPath}/${name}";
};

View file

@ -18,6 +18,13 @@ in
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain3;
};
tags = [
name
"blog"
];
paths = {
path0 = "/var/lib/website/dist";
path1 = "";

View file

@ -24,6 +24,13 @@ in
url0 = domain;
};
subdomain = name;
tags = [
name
"bitwarden"
"vault"
"bit"
"warden"
];
paths = {
path0 = "${servicePath}/${label}/BackupDir";
};

View file

@ -8,6 +8,8 @@ let
;
in
{
name = "router";
label = "Router";
domains = {
url0 = domain0;
url1 = domain1;
@ -17,6 +19,10 @@ in
dns = {
provider0 = "namecheap";
};
tags = [
"router"
"asus"
];
localhost = {
address0 = "127.0.0.1"; # Local
address1 = "0.0.0.0"; # All

View file

@ -15,25 +15,6 @@ let
instances
;
jellyfinTags = [
"jelly"
"video"
"streaming"
"movies"
"shows"
"music"
];
ollamaTags = [
instances.ollama.name
"chat"
"ai"
];
syncthingTags = [
instances.syncthing.name
"sync"
"thing"
instances.synology.name
];
in
{
name = "Self Hosted";
@ -49,35 +30,39 @@ in
];
keyword = "Website";
}
{
name = instances.opencloud.label;
url = "https://${instances.opencloud.domains.url0}";
tags = [
];
keyword = "Cloud";
}
{
name = instances.forgejo.label;
url = "https://${instances.forgejo.domains.url0}";
tags = [
instances.forgejo.name
"forge"
"git"
];
keyword = instances.forgejo.label;
}
{
name = "${instances.jellyfin.label} (Internet)";
url = "https://${instances.jellyfin.domains.url0}";
tags = jellyfinTags;
tags = [ ];
keyword = instances.jellyfin.label;
}
{
name = "${instances.jellyfin.label} (Local)";
url = "http://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}";
tags = jellyfinTags;
tags = [ ];
keyword = instances.jellyfin.label;
}
{
name = instances.mastodon.label;
url = "https://${instances.mastodon.domains.url0}";
tags = [
instances.mastodon.name
"mast"
"md"
];
keyword = instances.mastodon.label;
}
@ -96,51 +81,34 @@ in
name = instances.nextcloud.label;
url = "https://${instances.nextcloud.domains.url0}";
tags = [
instances.nextcloud.name
"next"
"cloud"
"calendar"
];
keyword = instances.nextcloud.label;
}
{
name = aliases.name2;
url = instances.web.domains.url2;
tags = [
aliases.name3
"blog"
];
keyword = aliases.name2;
}
{
name = "${instances.glance.label} (Local)";
url = "https://${instances.glance.domains.url0}";
tags = [
"glance"
"dashboard"
"weather"
"podcasts"
];
keyword = instances.glance.label;
}
{
name = "${instances.ollama.label} (Server)";
url = "https://${instances.ollama.domains.url0}";
tags = ollamaTags;
tags = [ ];
keyword = instances.ollama.label;
}
{
name = "${instances.ollama.label} (Desktop)";
url = "http://${mars.ip.address0}:${toString instances.ollama.ports.port0}";
tags = ollamaTags;
tags = [ ];
keyword = instances.ollama.label;
}
{
name = "Router";
url = "http://${instances.web.localhost.address2}";
tags = [
"router"
"asus"
];
keyword = "Router";
}
@ -148,9 +116,7 @@ in
name = "${instances.searx.label} (Internet)";
url = "https://${instances.searx.domains.url0}";
tags = [
"search"
"sear"
"searx"
];
keyword = instances.searx.label;
}
@ -158,25 +124,21 @@ in
name = "${instances.syncthing.label} (${instances.synology.label})";
url = "http://${synology.ip.address0}:${toString instances.syncthing.ports.port0}";
tags = [
"synology"
] ++ syncthingTags;
];
keyword = instances.syncthing.label;
}
{
name = "${instances.syncthing.label} (Desktop)";
url = "http://localhost:${toString instances.syncthing.ports.port0}";
tags = [
"desktop"
] ++ syncthingTags;
];
keyword = instances.syncthing.label;
}
{
name = instances.synology.label;
url = "https://${synology.ip.address0}:${toString instances.synology.ports.port0}";
tags = [
instances.synology.name
"dsm"
"cloud"
];
keyword = instances.synology.label;
}
@ -184,11 +146,7 @@ in
name = instances.vaultwarden.label;
url = "https://${instances.vaultwarden.domains.url0}";
tags = [
instances.vaultwarden.name
"bitwarden"
"vault"
"bit"
"warden"
];
keyword = instances.vaultwarden.label;
}