lightsail-tokyo: add libreddit

This commit is contained in:
Guanran Wang 2024-07-14 02:01:10 +08:00
parent fa8108f522
commit 9c74f706e5
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
2 changed files with 40 additions and 19 deletions

View file

@ -107,3 +107,8 @@ rss.ny4.dev {
import default import default
reverse_proxy localhost:9300 reverse_proxy localhost:9300
} }
reddit.ny4.dev {
import default
reverse_proxy localhost:9400
}

View file

@ -184,6 +184,7 @@
database.passwordFile = toString (pkgs.writeText "password" "keycloak"); database.passwordFile = toString (pkgs.writeText "password" "keycloak");
}; };
# TODO: eventually, use blog homepage
services.homepage-dashboard = { services.homepage-dashboard = {
enable = true; enable = true;
listenPort = 9200; listenPort = 9200;
@ -203,6 +204,17 @@
in in
mapAttrsToList' { mapAttrsToList' {
"Services" = mapAttrsToList' { "Services" = mapAttrsToList' {
"Mumble" = {
description = "${getDesc pkgs.mumble} (Connect with tyo0.ny4.dev:64738)";
};
"Ntfy" = {
description = getDesc pkgs.ntfy;
href = "https://ntfy.ny4.dev/";
};
"Redlib" = {
description = getDesc pkgs.redlib;
href = "https://reddit.ny4.dev/";
};
"SearXNG" = { "SearXNG" = {
description = getDesc pkgs.searxng; description = getDesc pkgs.searxng;
href = "https://searx.ny4.dev/"; href = "https://searx.ny4.dev/";
@ -211,15 +223,19 @@
description = getDesc pkgs.wastebin; description = getDesc pkgs.wastebin;
href = "https://pb.ny4.dev/"; href = "https://pb.ny4.dev/";
}; };
"Ntfy" = {
description = getDesc pkgs.ntfy;
href = "https://ntfy.ny4.dev/";
};
"Mumble" = {
description = "${getDesc pkgs.mumble} (Connect with tyo0.ny4.dev:64738)";
}; };
"Links" = mapAttrsToList' {
"Blog".href = "https://blog.ny4.dev/";
"Forgejo".href = "https://git.ny4.dev/nyancat";
"GitHub".href = "https://github.com/Guanran928";
"Mastodon".herf = "https://mastodon.ny4.dev/@nyancat";
"Matrix".href = "https://matrix.to/#/@nyancat:ny4.dev";
}; };
"Private stuff" = mapAttrsToList' { "Private stuff" = mapAttrsToList' {
"Forgejo" = {
description = getDesc pkgs.forgejo;
href = "https://git.ny4.dev/";
};
"Mastodon" = rec { "Mastodon" = rec {
description = getDesc pkgs.mastodon; description = getDesc pkgs.mastodon;
href = "https://mastodon.ny4.dev/"; href = "https://mastodon.ny4.dev/";
@ -230,25 +246,18 @@
description = getDesc pkgs.element-web; description = getDesc pkgs.element-web;
href = "https://element.ny4.dev/"; href = "https://element.ny4.dev/";
}; };
"Miniflux" = {
description = getDesc pkgs.miniflux;
href = "https://rss.ny4.dev/";
};
"PixivFE" = { "PixivFE" = {
description = getDesc inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.pixivfe; description = getDesc inputs.self.legacyPackages.${pkgs.stdenv.hostPlatform.system}.pixivfe;
href = "https://pixiv.ny4.dev"; href = "https://pixiv.ny4.dev";
}; };
"Uptime Kuma" = { "Uptime Kuma" = {
description = getDesc pkgs.uptime-kuma; description = getDesc pkgs.uptime-kuma;
href = "https://uptime.ny4.dev/"; href = "https://uptime.ny4.dev/";
}; };
"Forgejo" = {
description = getDesc pkgs.forgejo;
href = "https://git.ny4.dev/";
};
};
"Links" = mapAttrsToList' {
"Blog".href = "https://blog.ny4.dev/";
"Forgejo".href = "https://git.ny4.dev/nyancat";
"GitHub".href = "https://github.com/Guanran928";
"Mastodon".herf = "https://mastodon.ny4.dev/@nyancat";
"Matrix".href = "https://matrix.to/#/@nyancat:ny4.dev";
}; };
}; };
}; };
@ -278,6 +287,13 @@
}; };
}; };
services.libreddit = {
enable = true;
package = pkgs.redlib;
address = "127.0.0.1";
port = 9400;
};
### Prevents me from bankrupt ### Prevents me from bankrupt
# https://fmk.im/p/shutdown-aws/ # https://fmk.im/p/shutdown-aws/
services.vnstat.enable = true; services.vnstat.enable = true;