feat: new wiki domain
This commit is contained in:
parent
b7cb7eeade
commit
b6b9ae0579
3 changed files with 57 additions and 13 deletions
|
@ -25,7 +25,6 @@ in {
|
||||||
services.skynet.acme.domains = [
|
services.skynet.acme.domains = [
|
||||||
"discord.skynet.ie"
|
"discord.skynet.ie"
|
||||||
"public.skynet.ie"
|
"public.skynet.ie"
|
||||||
"renew.skynet.ie"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.skynet.dns.records = [
|
services.skynet.dns.records = [
|
||||||
|
@ -45,11 +44,6 @@ in {
|
||||||
r_type = "CNAME";
|
r_type = "CNAME";
|
||||||
value = config.services.skynet.host.name;
|
value = config.services.skynet.host.name;
|
||||||
}
|
}
|
||||||
{
|
|
||||||
record = "renew";
|
|
||||||
r_type = "CNAME";
|
|
||||||
value = config.services.skynet.host.name;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
@ -82,13 +76,6 @@ in {
|
||||||
root = "${inputs.compsoc_public.packages.x86_64-linux.default}";
|
root = "${inputs.compsoc_public.packages.x86_64-linux.default}";
|
||||||
locations."/".extraConfig = "autoindex on;";
|
locations."/".extraConfig = "autoindex on;";
|
||||||
};
|
};
|
||||||
|
|
||||||
# for alumni members to renew their account
|
|
||||||
"renew.skynet.ie" = {
|
|
||||||
forceSSL = true;
|
|
||||||
useACMEHost = "skynet";
|
|
||||||
root = "${inputs.skynet_website_renew.defaultPackage."x86_64-linux"}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
55
applications/skynet.ie/wiki.nix
Normal file
55
applications/skynet.ie/wiki.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
name = "wiki";
|
||||||
|
cfg = config.services.skynet."${name}";
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
];
|
||||||
|
|
||||||
|
options.services.skynet."${name}" = {
|
||||||
|
enable = mkEnableOption "Skynet Wiki";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.skynet.acme.domains = [
|
||||||
|
"renew.skynet.ie"
|
||||||
|
"wiki.skynet.ie"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.skynet.dns.records = [
|
||||||
|
{
|
||||||
|
record = "renew";
|
||||||
|
r_type = "CNAME";
|
||||||
|
value = config.services.skynet.host.name;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
record = "wiki";
|
||||||
|
r_type = "CNAME";
|
||||||
|
value = config.services.skynet.host.name;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts = {
|
||||||
|
"wiki.skynet.ie" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = "skynet";
|
||||||
|
root = "${inputs.skynet_website_renew.defaultPackage."x86_64-linux"}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# redirect old links to the new wiki
|
||||||
|
"renew.skynet.ie" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = "skynet";
|
||||||
|
locations."/".return = "307 https://wiki.skynet.ie";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -26,6 +26,7 @@ Notes:
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
../applications/skynet.ie/skynet.ie.nix
|
../applications/skynet.ie/skynet.ie.nix
|
||||||
|
../applications/skynet.ie/wiki.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
deployment = {
|
deployment = {
|
||||||
|
@ -40,5 +41,6 @@ in {
|
||||||
host = host;
|
host = host;
|
||||||
backup.enable = true;
|
backup.enable = true;
|
||||||
website.enable = true;
|
website.enable = true;
|
||||||
|
wiki.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue