Compare commits

...

4 Commits

Author SHA1 Message Date
393553c6c5 update 2026-03-10 19:36:18 -04:00
3d8e47689c transition domain name website + sources 2026-03-10 15:05:48 -04:00
f3f5a9c726 caddy: add redirect from old domain 2026-03-10 14:53:35 -04:00
3d4aea8c5b caddy: move to new domain 2026-03-10 14:53:33 -04:00
4 changed files with 74 additions and 31 deletions

52
flake.lock generated
View File

@@ -89,11 +89,11 @@
]
},
"locked": {
"lastModified": 1772867152,
"narHash": "sha256-RIFgZ4O6Eg+5ysZ8Tqb3YvcqiRaNy440GEY22ltjRrs=",
"lastModified": 1773025010,
"narHash": "sha256-khlHllTsovXgT2GZ0WxT4+RvuMjNeR5OW0UYeEHPYQo=",
"owner": "nix-community",
"repo": "disko",
"rev": "eaafb89b56e948661d618eefd4757d9ea8d77514",
"rev": "7b9f7f88ab3b339f8142dc246445abb3c370d3d3",
"type": "github"
},
"original": {
@@ -197,11 +197,11 @@
]
},
"locked": {
"lastModified": 1772633058,
"narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=",
"lastModified": 1772985280,
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865",
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
"type": "github"
},
"original": {
@@ -300,11 +300,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1771969195,
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
"lastModified": 1772972630,
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72",
"type": "github"
},
"original": {
@@ -316,11 +316,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1772822230,
"narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=",
"lastModified": 1773068389,
"narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "71caefce12ba78d84fe618cf61644dce01cf3a96",
"rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
"type": "github"
},
"original": {
@@ -454,11 +454,11 @@
]
},
"locked": {
"lastModified": 1772799438,
"narHash": "sha256-81/Ow6L5azplWp9p8gtl/Q1m5s2gCX4iuKNF5ujwxBA=",
"lastModified": 1773021923,
"narHash": "sha256-ro+i3wNoD2p5FloGGlkCzdmzgBDeq2LJwaIpaI9Dk7Q=",
"owner": "nix-community",
"repo": "srvos",
"rev": "e6ec80588a07aea2cdb67c2865759e02d85b94b2",
"rev": "7f92c2bcbeb42ce87770a7565f0e6f92c8134354",
"type": "github"
},
"original": {
@@ -530,11 +530,11 @@
"trackerlist": {
"flake": false,
"locked": {
"lastModified": 1772924980,
"narHash": "sha256-47Q6O7vNQZy2hMImW06jwaZvRVV/YzXMAPIbYyhSHN0=",
"lastModified": 1773184165,
"narHash": "sha256-uGD+QgYZD1ntXl43523bKziyBUs1c3ONi+n5FeFZre0=",
"owner": "ngosang",
"repo": "trackerslist",
"rev": "01092a95d06dccfe822fcded7bd33b32b5021f52",
"rev": "448eba328ad00172a4ba049ec9f9f073b9cd278b",
"type": "github"
},
"original": {
@@ -579,17 +579,17 @@
"website": {
"flake": false,
"locked": {
"lastModified": 1768266466,
"narHash": "sha256-d4dZzEcIKuq4DhNtXczaflpRifAtcOgNr45W2Bexnps=",
"lastModified": 1773169503,
"narHash": "sha256-P+T2H18k3zmEHxu7ZIDYyTrK5G3KUcZYW1AzVMKyCMs=",
"ref": "refs/heads/main",
"rev": "06011a27456b3b9f983ef1aa142b5773bcb52b6e",
"revCount": 23,
"rev": "ae7a7d8325f841c52efb6fd81c4956b84631aa06",
"revCount": 24,
"type": "git",
"url": "https://git.gardling.com/titaniumtown/website"
"url": "https://git.sigkill.computer/titaniumtown/website"
},
"original": {
"type": "git",
"url": "https://git.gardling.com/titaniumtown/website"
"url": "https://git.sigkill.computer/titaniumtown/website"
}
},
"ytbn-graphing-software": {
@@ -605,11 +605,11 @@
"rev": "ac6265eae734363f95909df9a3739bf6360fa721",
"revCount": 1130,
"type": "git",
"url": "https://git.gardling.com/titaniumtown/YTBN-Graphing-Software"
"url": "https://git.sigkill.computer/titaniumtown/YTBN-Graphing-Software"
},
"original": {
"type": "git",
"url": "https://git.gardling.com/titaniumtown/YTBN-Graphing-Software"
"url": "https://git.sigkill.computer/titaniumtown/YTBN-Graphing-Software"
}
}
},

View File

@@ -56,7 +56,7 @@
};
website = {
url = "git+https://git.gardling.com/titaniumtown/website";
url = "git+https://git.sigkill.computer/titaniumtown/website";
flake = false;
};
@@ -66,7 +66,7 @@
};
ytbn-graphing-software = {
url = "git+https://git.gardling.com/titaniumtown/YTBN-Graphing-Software";
url = "git+https://git.sigkill.computer/titaniumtown/YTBN-Graphing-Software";
};
arr-init = {

View File

@@ -45,7 +45,8 @@ rec {
https = {
certs = services_dir + "/http_certs";
domain = "gardling.com";
domain = "sigkill.computer";
old_domain = "gardling.com"; # Redirect traffic from old domain
};
gitea = {

View File

@@ -41,6 +41,9 @@ let
hugo --minify -d $out;
'';
};
newDomain = service_configs.https.domain;
oldDomain = service_configs.https.old_domain;
in
{
imports = [
@@ -52,14 +55,53 @@ in
services.caddy = {
enable = true;
email = "titaniumtown@proton.me";
# Enable on-demand TLS for old domain redirects
# Certs are issued dynamically when subdomains are accessed
globalConfig = ''
on_demand_tls {
ask http://localhost:9123/check
}
'';
# Internal endpoint to validate on-demand TLS requests
# Only allows certs for *.${oldDomain}
extraConfig = ''
http://localhost:9123 {
@allowed expression {query.domain}.endsWith(".${oldDomain}") || {query.domain} == "${oldDomain}" || {query.domain} == "www.${oldDomain}"
respond @allowed 200
respond 403
}
'';
virtualHosts = {
${service_configs.https.domain} = {
${newDomain} = {
extraConfig = ''
root * ${hugoWebsite}
file_server browse
'';
serverAliases = [ "www.${service_configs.https.domain}" ];
serverAliases = [ "www.${newDomain}" ];
};
# Redirect old domain (bare + www) to new domain
${oldDomain} = {
extraConfig = ''
redir https://${newDomain}{uri} permanent
'';
serverAliases = [ "www.${oldDomain}" ];
};
# Wildcard redirect for all old domain subdomains
# Uses on-demand TLS - certs issued automatically on first request
"*.${oldDomain}" = {
extraConfig = ''
tls {
on_demand
}
# {labels.2} extracts subdomain from *.gardling.com
redir https://{labels.2}.${newDomain}{uri} permanent
'';
};
};
};