feat: current version is always on top

This commit is contained in:
silver 2024-06-14 21:34:43 +01:00
parent 5c8dcdef00
commit 1d3549d541
Signed by: silver
GPG key ID: 54E2C71918E93B74
4 changed files with 103 additions and 36 deletions

View file

@ -9,15 +9,6 @@ with lib; {
imports = []; imports = [];
config = { config = {
assertions = [
{
assertion = asserts.assertOneOf "year" year [
"2009"
"2017"
];
}
];
services.skynet.acme.domains = [ services.skynet.acme.domains = [
"${year}.skynet.ie" "${year}.skynet.ie"
]; ];

View file

@ -57,8 +57,7 @@ in {
forceSSL = true; forceSSL = true;
useACMEHost = "skynet"; useACMEHost = "skynet";
locations = { locations = {
# this alwas points to teh current version of teh site "/".root = "${inputs.skynet_website.defaultPackage."x86_64-linux"}";
"/".root = "${inputs.skynet_website_2017.defaultPackage."x86_64-linux"}";
# this redirects old links to new format # this redirects old links to new format
"~* ~(?<username>[a-z_0-9]*)(?<files>\\S*)$" = { "~* ~(?<username>[a-z_0-9]*)(?<files>\\S*)$" = {

View file

@ -619,6 +619,20 @@
} }
}, },
"nixpkgs_14": { "nixpkgs_14": {
"locked": {
"lastModified": 1689935543,
"narHash": "sha256-6GQ9ib4dA/r1leC5VUpsBo0BmDvNxLjKrX1iyL+h8mc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e43e2448161c0a2c4928abec4e16eae1516571bc",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_15": {
"locked": { "locked": {
"lastModified": 1690026219, "lastModified": 1690026219,
"narHash": "sha256-oOduRk/kzQxOBknZXTLSEYd7tk+GoKvr8wV6Ab+t4AU=", "narHash": "sha256-oOduRk/kzQxOBknZXTLSEYd7tk+GoKvr8wV6Ab+t4AU=",
@ -632,7 +646,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_15": { "nixpkgs_16": {
"locked": { "locked": {
"lastModified": 1689935543, "lastModified": 1689935543,
"narHash": "sha256-6GQ9ib4dA/r1leC5VUpsBo0BmDvNxLjKrX1iyL+h8mc=", "narHash": "sha256-6GQ9ib4dA/r1leC5VUpsBo0BmDvNxLjKrX1iyL+h8mc=",
@ -646,7 +660,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_16": { "nixpkgs_17": {
"locked": { "locked": {
"lastModified": 1695978539, "lastModified": 1695978539,
"narHash": "sha256-lta5HToBZMWZ2hl5CautNSUgIZViR41QxN7JKbMAjgQ=", "narHash": "sha256-lta5HToBZMWZ2hl5CautNSUgIZViR41QxN7JKbMAjgQ=",
@ -660,7 +674,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_17": { "nixpkgs_18": {
"locked": { "locked": {
"lastModified": 1695837737, "lastModified": 1695837737,
"narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=", "narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=",
@ -807,6 +821,7 @@
"skynet_discord_bot": "skynet_discord_bot", "skynet_discord_bot": "skynet_discord_bot",
"skynet_ldap_backend": "skynet_ldap_backend", "skynet_ldap_backend": "skynet_ldap_backend",
"skynet_ldap_frontend": "skynet_ldap_frontend", "skynet_ldap_frontend": "skynet_ldap_frontend",
"skynet_website": "skynet_website",
"skynet_website_2009": "skynet_website_2009", "skynet_website_2009": "skynet_website_2009",
"skynet_website_2017": "skynet_website_2017", "skynet_website_2017": "skynet_website_2017",
"skynet_website_games": "skynet_website_games", "skynet_website_games": "skynet_website_games",
@ -922,11 +937,32 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"skynet_website_2009": { "skynet_website": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_14",
"utils": "utils_7" "utils": "utils_7"
}, },
"locked": {
"host": "gitlab.skynet.ie",
"lastModified": 1707154174,
"narHash": "sha256-oUOD6aIy8KvIsiAWxLApPgAkigDZwp3xZ8bmhKoWszY=",
"owner": "compsoc1%2Fskynet",
"repo": "website%2F2017",
"rev": "c81db388fac570a8cb646391ea461b9e60282043",
"type": "gitlab"
},
"original": {
"host": "gitlab.skynet.ie",
"owner": "compsoc1%2Fskynet",
"repo": "website%2F2017",
"type": "gitlab"
}
},
"skynet_website_2009": {
"inputs": {
"nixpkgs": "nixpkgs_15",
"utils": "utils_8"
},
"locked": { "locked": {
"host": "gitlab.skynet.ie", "host": "gitlab.skynet.ie",
"lastModified": 1690726067, "lastModified": 1690726067,
@ -945,8 +981,8 @@
}, },
"skynet_website_2017": { "skynet_website_2017": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_15", "nixpkgs": "nixpkgs_16",
"utils": "utils_8" "utils": "utils_9"
}, },
"locked": { "locked": {
"host": "gitlab.skynet.ie", "host": "gitlab.skynet.ie",
@ -966,8 +1002,8 @@
}, },
"skynet_website_games": { "skynet_website_games": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_16", "nixpkgs": "nixpkgs_17",
"utils": "utils_9" "utils": "utils_10"
}, },
"locked": { "locked": {
"host": "gitlab.skynet.ie", "host": "gitlab.skynet.ie",
@ -987,8 +1023,8 @@
}, },
"skynet_website_renew": { "skynet_website_renew": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_17", "nixpkgs": "nixpkgs_18",
"utils": "utils_10" "utils": "utils_11"
}, },
"locked": { "locked": {
"host": "gitlab.skynet.ie", "host": "gitlab.skynet.ie",
@ -1067,6 +1103,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_12": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -1223,6 +1274,24 @@
"type": "github" "type": "github"
} }
}, },
"utils_11": {
"inputs": {
"systems": "systems_12"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": { "utils_2": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
@ -1351,11 +1420,11 @@
"systems": "systems_10" "systems": "systems_10"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1689068808,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -41,18 +41,6 @@
owner = "compsoc1%2Fskynet"; owner = "compsoc1%2Fskynet";
repo = "ldap%2Ffrontend"; repo = "ldap%2Ffrontend";
}; };
skynet_website_2017 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2017";
};
skynet_website_2009 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2009";
};
skynet_website_renew = { skynet_website_renew = {
type = "gitlab"; type = "gitlab";
host = "gitlab.skynet.ie"; host = "gitlab.skynet.ie";
@ -77,6 +65,26 @@
owner = "compsoc1%2Fcompsoc"; owner = "compsoc1%2Fcompsoc";
repo = "presentations%2Fpresentations"; repo = "presentations%2Fpresentations";
}; };
# skynet.ie
skynet_website = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2017";
};
skynet_website_2017 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2017";
};
skynet_website_2009 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2009";
};
}; };
nixConfig = { nixConfig = {