jfdic-web: deployed

This commit is contained in:
Fiscal Velvet Poet 2021-11-16 20:13:12 +10:00
parent 8705839adf
commit 04f102d7c4
Signed by: fiscalvelvetpoet
GPG key ID: D8EBFD58B023BD47
3 changed files with 53 additions and 3 deletions

View file

@ -1,4 +1,6 @@
# NixOps configuration for toscano # NixOps configuration for toscano
#
# https://en.wikipedia.org/wiki/Joseph_Toscano
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
@ -8,6 +10,7 @@
[ [
../networks/linode.nix ../networks/linode.nix
../profiles/gitea.nix ../profiles/gitea.nix
../profiles/jfdic-web.nix
../secrets/gitea.nix ../secrets/gitea.nix
]; ];

View file

@ -1,9 +1,9 @@
{ {
"jfdic-web": { "jfdic-web": {
"sha256": "1fj352d70xfl9vdi7xzz6hnzjpqzffc7fj5wnf7pr879wsdp9fbh", "sha256": "0qq4ww89isivyllqs15cg21f4g9fhy3zpiywxash2hk5dg6klx50",
"type": "tarball", "type": "tarball",
"url": "https://source.jfdic.org/JFDIC/jfdic-web/archive/456c35c6113d7f6473fc01318aa47e0124f08f80.tar.gz", "url": "https://source.jfdic.org/JFDIC/jfdic-web/archive/60bdb93b5c98121252d1f6174e11baae17a04b31.tar.gz",
"url_template": "https://source.jfdic.org/JFDIC/jfdic-web/archive/456c35c6113d7f6473fc01318aa47e0124f08f80.tar.gz" "url_template": "https://source.jfdic.org/JFDIC/jfdic-web/archive/60bdb93b5c98121252d1f6174e11baae17a04b31.tar.gz"
}, },
"niv": { "niv": {
"branch": "master", "branch": "master",

47
profiles/jfdic-web.nix Normal file
View file

@ -0,0 +1,47 @@
# NixOps configuration for deploying the JFDIC website
{ config, pkgs, ... }:
let
sources = import ../nix/sources.nix;
jfdic-web = import sources.jfdic-web { };
webdomain = "jfdic.org";
in {
environment.sessionVariables = {
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
};
services.nginx = {
enable = true; # Enable Nginx
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"${webdomain}" = { # website hostname
enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL
root = "${jfdic-web}"; # Wesbite root
};
"www.${webdomain}" = { # Respect our elders :-)
locations."/".extraConfig =
"return 301 $scheme://${webdomain}$request_uri;";
};
};
};
security.acme = {
acceptTerms = true;
certs = {
"${webdomain}" = {
email = "admin@${webdomain}";
#group = "matrix-synapse";
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}