Merge pull request #567 from genebean/site

Setup littlelink site
This commit is contained in:
Gene Liverman 2025-11-05 23:16:49 -05:00 committed by GitHub
commit f10139c24a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,20 @@
{ config, ... }: let { config, pkgs, ... }: let
domain = "genebean.me"; domain = "genebean.me";
http_port = 80; http_port = 80;
https_port = 443; https_port = 443;
in { in {
environment.etc.nginx-littlelinks = {
# Info generated via
# nurl https://github.com/genebean/littlelink genebean-sometag
source = pkgs.fetchFromGitHub {
owner = "genebean";
repo = "littlelink";
rev = "genebean-1.0.1";
hash = "sha256-r7cvcKdlivQ2MA1UhypwdJrg7CREzTZE5fiNA9AWY/0=";
};
};
security.acme.certs."${domain}" = { security.acme.certs."${domain}" = {
email = "lets-encrypt@technicalissues.us"; email = "lets-encrypt@technicalissues.us";
inheritDefaults = false; inheritDefaults = false;
@ -38,7 +49,7 @@ in {
forceSSL = true; forceSSL = true;
locations = { locations = {
"/" = { "/" = {
return = "302 https://beanbag.technicalissues.us"; root = "/etc/nginx-littlelinks";
}; };
"/.well-known/lnurlp/genebean" = { "/.well-known/lnurlp/genebean" = {
return = '' return = ''
@ -60,9 +71,15 @@ in {
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;
''; '';
}; };
"/api/event" = {
return = "301 https://stats.technicalissues.us/api/event";
};
"/github" = { "/github" = {
return = "301 https://github.com/genebean"; return = "301 https://github.com/genebean";
}; };
"/js/script.outbound-links.js" = {
return = "301 https://stats.technicalissues.us/js/script.outbound-links.js";
};
"/mastodon" = { "/mastodon" = {
return = "302 https://fosstodon.org/@genebean"; return = "302 https://fosstodon.org/@genebean";
}; };