feat: slight reworks and added the 2006 site
This commit is contained in:
parent
6e496b4867
commit
07b6e478cc
5 changed files with 144 additions and 48 deletions
|
@ -9,10 +9,6 @@ with lib; {
|
|||
imports = [];
|
||||
|
||||
config = {
|
||||
services.skynet.acme.domains = [
|
||||
"${year}.skynet.ie"
|
||||
];
|
||||
|
||||
services.skynet.dns.records = [
|
||||
{
|
||||
record = year;
|
||||
|
@ -27,6 +23,28 @@ with lib; {
|
|||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
root = "${inputs."skynet_website_${year}".defaultPackage."x86_64-linux"}";
|
||||
# Handle any of the old php sites
|
||||
# https://stackoverflow.com/a/21911610
|
||||
locations = {
|
||||
"/" = {
|
||||
index = "index.html index.htm index.php";
|
||||
tryFiles = "$uri $uri.html $uri/ @extensionless-php";
|
||||
};
|
||||
|
||||
"~ \\.php$" = {
|
||||
extraConfig = ''
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools.old_sites.socket};
|
||||
fastcgi_index index.php;
|
||||
'';
|
||||
tryFiles = "$uri =404";
|
||||
};
|
||||
|
||||
"@extensionless-php" = {
|
||||
extraConfig = ''
|
||||
rewrite ^(.*)$ $1.php last;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -15,6 +15,7 @@ in {
|
|||
(import ./old_site.nix {year = "2023";})
|
||||
(import ./old_site.nix {year = "2017";})
|
||||
(import ./old_site.nix {year = "2009";})
|
||||
(import ./old_site.nix {year = "2006";})
|
||||
];
|
||||
|
||||
options.services.skynet."${name}" = {
|
||||
|
@ -23,10 +24,8 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
services.skynet.acme.domains = [
|
||||
"www.skynet.ie"
|
||||
"discord.skynet.ie"
|
||||
"*.skynet.ie"
|
||||
"*.discord.skynet.ie"
|
||||
"public.skynet.ie"
|
||||
];
|
||||
|
||||
services.skynet.dns.records = [
|
||||
|
@ -103,5 +102,19 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Some old sites need a php pool running
|
||||
services.phpfpm.pools.old_sites = {
|
||||
user = "nobody";
|
||||
settings = {
|
||||
"pm" = "dynamic";
|
||||
"listen.owner" = config.services.nginx.user;
|
||||
"pm.max_children" = 5;
|
||||
"pm.start_servers" = 2;
|
||||
"pm.min_spare_servers" = 1;
|
||||
"pm.max_spare_servers" = 3;
|
||||
"pm.max_requests" = 500;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,11 +17,6 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.skynet.acme.domains = [
|
||||
"renew.skynet.ie"
|
||||
"wiki.skynet.ie"
|
||||
];
|
||||
|
||||
services.skynet.dns.records = [
|
||||
{
|
||||
record = "renew";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue