feat: skynet 2016 is live!
This commit is contained in:
parent
2ea0dc0d6b
commit
1c33c78c50
2 changed files with 63 additions and 23 deletions
55
applications/skynet.ie.nix
Normal file
55
applications/skynet.ie.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.skynet;
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./acme.nix
|
||||
./dns.nix
|
||||
];
|
||||
|
||||
options.services.skynet = {
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
skynet_dns.records = [
|
||||
# means root domain, so skynet.ie
|
||||
{record="@"; r_type="A"; value=cfg.host.ip;}
|
||||
{record="2016"; r_type="CNAME"; value="skynet.ie";}
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
services.httpd = {
|
||||
enable = true;
|
||||
group = "acme";
|
||||
|
||||
virtualHosts = {
|
||||
# main site
|
||||
"skynet.ie" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
documentRoot = "${inputs.skynet_website.defaultPackage."x86_64-linux"}";
|
||||
# only on skynet.ie
|
||||
# skynet.ie/~username
|
||||
enableUserDir = true;
|
||||
};
|
||||
|
||||
# archive of teh site as it was ~2012 to 2016
|
||||
"2016.skynet.ie" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "skynet";
|
||||
documentRoot = "${inputs.skynet_website_2016.defaultPackage."x86_64-linux"}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue