voc-web: initial deployment
This commit is contained in:
parent
4017749dd7
commit
32fb11f020
|
@ -12,6 +12,7 @@
|
|||
../profiles/hakyll-skeleton.nix
|
||||
../profiles/jfdic-web.nix
|
||||
../profiles/resrok-web.nix
|
||||
../profiles/voc-web.nix
|
||||
../secrets/gitea.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -53,5 +53,11 @@
|
|||
"type": "tarball",
|
||||
"url": "https://source.jfdic.org/resrok/resrok-web/archive/6f61643f8b02be9e6c0276c8286e6daba1567108.tar.gz",
|
||||
"url_template": "https://source.jfdic.org/resrok/resrok-web/archive/6f61643f8b02be9e6c0276c8286e6daba1567108.tar.gz"
|
||||
},
|
||||
"voc-web": {
|
||||
"sha256": "0f2hghgikcw4xzadsr4vvxlqc0df3cl4f8fj1l8cxmapx1ghk4mm",
|
||||
"type": "tarball",
|
||||
"url": "https://source.jfdic.org/voc/voc-web/archive/dad25430bad02b4d61ffab44b5989b7f72da5e3b.tar.gz",
|
||||
"url_template": "https://source.jfdic.org/voc/voc-web/archive/dad25430bad02b4d61ffab44b5989b7f72da5e3b.tar.gz"
|
||||
}
|
||||
}
|
||||
|
|
47
profiles/voc-web.nix
Normal file
47
profiles/voc-web.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
# NixOps configuration for deploying the Voices of Capricornia website
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
sources = import ../nix/sources.nix;
|
||||
voc-web = import sources.voc-web { };
|
||||
webdomain = "voicesofcapricornia.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 = "${voc-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 ];
|
||||
|
||||
}
|
Loading…
Reference in a new issue