resrok-web: initial deployment
This commit is contained in:
parent
0c9d26dc46
commit
f6c673300e
|
@ -11,6 +11,7 @@
|
|||
../profiles/gitea.nix
|
||||
../profiles/hakyll-skeleton.nix
|
||||
../profiles/jfdic-web.nix
|
||||
../profiles/resrok-web.nix
|
||||
../secrets/gitea.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -49,9 +49,9 @@
|
|||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"resrok-web": {
|
||||
"sha256": "11gfpnmpd8zqcqzydl02m9isz4vh9x1z1bgpi3fhbbxi1pjzdf25",
|
||||
"sha256": "0xcsjz0yyiq1qrpn632gmr89cwik9j1i9gw76vn063x4x5a759qh",
|
||||
"type": "tarball",
|
||||
"url": "https://source.jfdic.org/resrok/resrok-web/archive/321ac6c77d870a54fcf901423bdc2280bbcac755.tar.gz",
|
||||
"url_template": "https://source.jfdic.org/resrok/resrok-web/archive/321ac6c77d870a54fcf901423bdc2280bbcac755.tar.gz"
|
||||
"url": "https://source.jfdic.org/resrok/resrok-web/archive/9e2c51f9fbc61852d16fc8abe0878e49af0dd808.tar.gz",
|
||||
"url_template": "https://source.jfdic.org/resrok/resrok-web/archive/9e2c51f9fbc61852d16fc8abe0878e49af0dd808.tar.gz"
|
||||
}
|
||||
}
|
||||
|
|
46
profiles/resrok-web.nix
Normal file
46
profiles/resrok-web.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
# NixOps configuration for deploying the JFDIC website
|
||||
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
let
|
||||
sources = import ../nix/sources.nix;
|
||||
resrok-web = import sources.resrok-web {};
|
||||
webdomain = "resrok.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 = "${resrok-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