Brendan Golden
fbff2a4ab2
All checks were successful
Build_Deploy / linter (push) Successful in 6s
Build_Deploy / build (push) Successful in 3m44s
Build_Deploy / deploy_dns (push) Successful in 46s
Build_Deploy / deploy_active (active) (push) Successful in 47s
Build_Deploy / deploy_active (active-core) (push) Successful in 1m19s
Build_Deploy / deploy_active (active-ext) (push) Successful in 30s
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
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"}/wiki";
|
|
};
|
|
|
|
# redirect old links to the new wiki
|
|
"renew.skynet.ie" = {
|
|
forceSSL = true;
|
|
useACMEHost = "skynet";
|
|
locations."/".return = "307 https://wiki.skynet.ie";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|