mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
refactor: abstracting out bookmark info
This commit is contained in:
parent
77a31e9688
commit
532f798bd0
20 changed files with 87 additions and 119 deletions
|
@ -56,6 +56,7 @@ let
|
||||||
subdomain = stringType;
|
subdomain = stringType;
|
||||||
label = stringType;
|
label = stringType;
|
||||||
name = stringType;
|
name = stringType;
|
||||||
|
short = stringType;
|
||||||
hostname = stringType;
|
hostname = stringType;
|
||||||
tags = listType;
|
tags = listType;
|
||||||
domains = genOptions stringType "url";
|
domains = genOptions stringType "url";
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
{
|
{
|
||||||
label = audiobookshelfLabel;
|
label = audiobookshelfLabel;
|
||||||
name = audiobookshelfName;
|
name = audiobookshelfName;
|
||||||
|
short = "Books";
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${audiobookshelfName}";
|
path0 = "${sopsPath}/${audiobookshelfName}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = label;
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${domain3}";
|
address0 = "noreply@${domain3}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = label;
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${domain0}";
|
address0 = "noreply@${domain0}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,6 +13,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Jelly";
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
|
@ -33,8 +34,8 @@ in
|
||||||
path1 = "${servicePath}/${label}/cache";
|
path1 = "${servicePath}/${label}/cache";
|
||||||
};
|
};
|
||||||
ports = {
|
ports = {
|
||||||
port0 = 5055; # Jellyseer
|
port0 = 8096; # Jellyfin HTTP
|
||||||
port1 = 8096; # Jellyfin HTTP
|
port1 = 5055; # Jellyseer
|
||||||
port2 = 8920; # Jellyfin HTTPS
|
port2 = 8920; # Jellyfin HTTPS
|
||||||
};
|
};
|
||||||
ssl = {
|
ssl = {
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Mast";
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${domain3}";
|
address0 = "noreply@${domain3}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,6 +11,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = label;
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Next";
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${name}.${domain0}";
|
address0 = "noreply@${name}.${domain0}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = label;
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Cloud";
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${domain0}";
|
address0 = "noreply@${domain0}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Cast";
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Peer";
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${domain3}";
|
address0 = "noreply@${domain3}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Sear";
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${domain0}";
|
address0 = "noreply@${domain0}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Sync";
|
||||||
sops = {
|
sops = {
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,6 +11,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Nas";
|
||||||
tags = [
|
tags = [
|
||||||
name
|
name
|
||||||
"dsm"
|
"dsm"
|
||||||
|
|
|
@ -12,6 +12,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "upRoot";
|
||||||
email = {
|
email = {
|
||||||
address0 = "nick@${domain3}";
|
address0 = "nick@${domain3}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
{
|
{
|
||||||
label = label;
|
label = label;
|
||||||
name = name;
|
name = name;
|
||||||
|
short = "Vault";
|
||||||
email = {
|
email = {
|
||||||
address0 = "noreply@${name}.${domain0}";
|
address0 = "noreply@${name}.${domain0}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,10 +6,12 @@ let
|
||||||
domain2
|
domain2
|
||||||
domain3
|
domain3
|
||||||
;
|
;
|
||||||
|
label = "Router";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
label = label;
|
||||||
name = "router";
|
name = "router";
|
||||||
label = "Router";
|
short = label;
|
||||||
domains = {
|
domains = {
|
||||||
url0 = domain0;
|
url0 = domain0;
|
||||||
url1 = domain1;
|
url1 = domain1;
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
{ flake, ... }:
|
{ flake, ... }:
|
||||||
let
|
let
|
||||||
inherit (flake.config.people)
|
|
||||||
user0
|
|
||||||
;
|
|
||||||
inherit (flake.config.people.users.${user0})
|
|
||||||
aliases
|
|
||||||
;
|
|
||||||
inherit (flake.config.machines.devices)
|
inherit (flake.config.machines.devices)
|
||||||
synology
|
synology
|
||||||
ceres
|
ceres
|
||||||
|
@ -15,11 +9,64 @@ let
|
||||||
instances
|
instances
|
||||||
;
|
;
|
||||||
|
|
||||||
in
|
makeBookmarks =
|
||||||
{
|
{
|
||||||
name = "Self Hosted";
|
suffix,
|
||||||
toolbar = false;
|
urlTemplate,
|
||||||
bookmarks = [
|
services,
|
||||||
|
}:
|
||||||
|
builtins.map (name: {
|
||||||
|
name = "${instances.${name}.label} ${suffix}";
|
||||||
|
url = urlTemplate name;
|
||||||
|
tags = instances.${name}.tags;
|
||||||
|
keyword = instances.${name}.short;
|
||||||
|
}) (builtins.map (service: instances.${service}.name) services);
|
||||||
|
|
||||||
|
bookmarkConfigs = [
|
||||||
|
{
|
||||||
|
suffix = "(Remote)";
|
||||||
|
urlTemplate = name: "https://${instances.${name}.domains.url0}";
|
||||||
|
services = [
|
||||||
|
"audiobookshelf"
|
||||||
|
"forgejo"
|
||||||
|
"glance"
|
||||||
|
"jellyfin"
|
||||||
|
"mastodon"
|
||||||
|
"ollama"
|
||||||
|
"opencloud"
|
||||||
|
"owncast"
|
||||||
|
"peertube"
|
||||||
|
"searx"
|
||||||
|
"vaultwarden"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
suffix = "(Desktop)";
|
||||||
|
urlTemplate = name: "http://${mars.ip.address0}:${toString instances.${name}.ports.port0}";
|
||||||
|
services = [
|
||||||
|
"ollama"
|
||||||
|
"syncthing"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
suffix = "(Server)";
|
||||||
|
urlTemplate = name: "http://${ceres.ip.address0}:${toString instances.${name}.ports.port0}";
|
||||||
|
services = [
|
||||||
|
"jellyfin"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
suffix = "(Synology)";
|
||||||
|
urlTemplate = name: "http://${synology.ip.address0}:${toString instances.${name}.ports.port0}";
|
||||||
|
services = [
|
||||||
|
"syncthing"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
generatedBookmarks = builtins.concatLists (builtins.map makeBookmarks bookmarkConfigs);
|
||||||
|
|
||||||
|
flatBookmarks = [
|
||||||
{
|
{
|
||||||
name = "Elm-Land Server";
|
name = "Elm-Land Server";
|
||||||
url = "http://localhost:1234";
|
url = "http://localhost:1234";
|
||||||
|
@ -30,42 +77,6 @@ in
|
||||||
];
|
];
|
||||||
keyword = "Website";
|
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 = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.forgejo.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.jellyfin.label} (Internet)";
|
|
||||||
url = "https://${instances.jellyfin.domains.url0}";
|
|
||||||
tags = [ ];
|
|
||||||
keyword = instances.jellyfin.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.jellyfin.label} (Local)";
|
|
||||||
url = "http://${ceres.ip.address0}:${toString instances.jellyfin.ports.port1}";
|
|
||||||
tags = [ ];
|
|
||||||
keyword = instances.jellyfin.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = instances.mastodon.label;
|
|
||||||
url = "https://${instances.mastodon.domains.url0}";
|
|
||||||
tags = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.mastodon.label;
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "Namecheap";
|
name = "Namecheap";
|
||||||
url = "https://www.namecheap.com";
|
url = "https://www.namecheap.com";
|
||||||
|
@ -77,78 +88,16 @@ in
|
||||||
];
|
];
|
||||||
keyword = "Name";
|
keyword = "Name";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = instances.nextcloud.label;
|
|
||||||
url = "https://${instances.nextcloud.domains.url0}";
|
|
||||||
tags = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.nextcloud.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.glance.label} (Local)";
|
|
||||||
url = "https://${instances.glance.domains.url0}";
|
|
||||||
tags = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.glance.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.ollama.label} (Server)";
|
|
||||||
url = "https://${instances.ollama.domains.url0}";
|
|
||||||
tags = [ ];
|
|
||||||
keyword = instances.ollama.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.ollama.label} (Desktop)";
|
|
||||||
url = "http://${mars.ip.address0}:${toString instances.ollama.ports.port0}";
|
|
||||||
tags = [ ];
|
|
||||||
keyword = instances.ollama.label;
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "Router";
|
name = "Router";
|
||||||
url = "http://${instances.web.localhost.address2}";
|
url = "http://${instances.web.localhost.address2}";
|
||||||
tags = [
|
tags = [ ];
|
||||||
];
|
|
||||||
keyword = "Router";
|
keyword = "Router";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "${instances.searx.label} (Internet)";
|
|
||||||
url = "https://${instances.searx.domains.url0}";
|
|
||||||
tags = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.searx.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.syncthing.label} (${instances.synology.label})";
|
|
||||||
url = "http://${synology.ip.address0}:${toString instances.syncthing.ports.port0}";
|
|
||||||
tags = [
|
|
||||||
];
|
|
||||||
keyword = instances.syncthing.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "${instances.syncthing.label} (Desktop)";
|
|
||||||
url = "http://localhost:${toString instances.syncthing.ports.port0}";
|
|
||||||
tags = [
|
|
||||||
];
|
|
||||||
keyword = instances.syncthing.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = instances.synology.label;
|
|
||||||
url = "https://${synology.ip.address0}:${toString instances.synology.ports.port0}";
|
|
||||||
tags = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.synology.label;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = instances.vaultwarden.label;
|
|
||||||
url = "https://${instances.vaultwarden.domains.url0}";
|
|
||||||
tags = [
|
|
||||||
|
|
||||||
];
|
|
||||||
keyword = instances.vaultwarden.label;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "Self Hosted";
|
||||||
|
toolbar = false;
|
||||||
|
bookmarks = flatBookmarks ++ generatedBookmarks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ in
|
||||||
redir /.well-known/carddav /remote.php/dav/ 301
|
redir /.well-known/carddav /remote.php/dav/ 301
|
||||||
redir /.well-known/caldav /remote.php/dav/ 301
|
redir /.well-known/caldav /remote.php/dav/ 301
|
||||||
|
|
||||||
reverse_proxy ${localhost}:${toString service.ports.port1}
|
reverse_proxy ${localhost}:${toString service.ports.port0}
|
||||||
|
|
||||||
tls ${service.ssl.cert} ${service.ssl.key}
|
tls ${service.ssl.cert} ${service.ssl.key}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue