diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-02-21 06:54:34 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-02-21 07:00:59 +0900 |
commit | a44f6dfe7fe6bac9b98adf7d444294b9571bb702 (patch) | |
tree | 58508698539766cbff8103b8cfd418e3a98314a0 /static.nix | |
parent | f8d40ed3c8b56b9d20a58cb95a52703379ec6ee0 (diff) | |
download | nixos-conf-a44f6dfe7fe6bac9b98adf7d444294b9571bb702.tar.gz |
Support OpenNIC
Diffstat (limited to 'static.nix')
-rw-r--r-- | static.nix | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/static.nix b/static.nix index 06a10e4..603b3c0 100644 --- a/static.nix +++ b/static.nix @@ -68,32 +68,6 @@ in { root = "/var/lib/www/${domain}"; }; - "xem.${domain}" = let - address = "http://${phylactery.host}:${toString phylactery.port}"; - in { - enableACME = true; - forceSSL = true; - locations."/".proxyPass = address; - }; - - "cnx.gdn" = { - enableACME = true; - forceSSL = true; - root = "/var/lib/www/cnx.gdn"; - }; - - "px.cnx.gdn" = { - enableACME = true; - forceSSL = true; - locations = { - "/".index = "index.xhtml"; - "~ /index.xhtml$".extraConfig = '' - expires -1; - ''; - }; - root = "/var/lib/www/px.cnx.gdn"; - }; - "septagram.suricrasia.online" = { enableACME = true; extraConfig = '' @@ -102,7 +76,34 @@ in { forceSSL = true; root = "/var/lib/www/septagram.suricrasia.online"; }; + } // (let aliasOpenNIC = openNIC: icann: config: { + ${openNIC} = { + # https://wiki.opennic.org/opennic/tls + addSSL = true; + useACMEHost = icann; + } // config; + ${icann} = { + enableACME = true; + forceSSL = true; + } // config; }; + in (aliasOpenNIC "cercle.libre" "khoanh.${domain}" { + root = "/var/lib/www/cercle.libre"; + }) // (aliasOpenNIC "sinyx.indy" "cnx.gdn" { + root = "/var/lib/www/cnx.gdn"; + }) // (aliasOpenNIC "pix.sinyx.indy" "px.cnx.gdn" { + locations = { + "/".index = "index.xhtml"; + "~ /index.xhtml$".extraConfig = '' + expires -1; + ''; + }; + root = "/var/lib/www/px.cnx.gdn"; + }) // (aliasOpenNIC "striproman.pirate" "cmx.cnx.gdn" (let + address = "http://${phylactery.host}:${toString phylactery.port}"; + in { + locations."/".proxyPass = address; + }))); }; phylactery = { |