reciproka-ops/profiles/hakyll-skeleton.nix
Fiscal Velvet Poet c3823d0cfb
Correct grammar in the collective's name
You know that moment when you're learning a languaged and getting the
grammar all wrong? No? Niether do I.

resolves #6
2024-01-10 01:28:40 +10:00

43 lines
1.1 KiB
Nix

# NixOS configuration for deploying the Reciproka Kolektivo website
{
self,
config,
pkgs,
...
}: let
flake = builtins.getFlake (toString ../.);
hakyll-skeleton = import flake.inputs.hakyll-skeleton {};
webdomain = "skeleton.reciproka.co";
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 = "${hakyll-skeleton}"; # Wesbite root
};
"www.${webdomain}" = {
# Respect our elders :-)
locations."/".extraConfig = "return 301 $scheme://${webdomain}$request_uri;";
};
};
};
security.acme = {
acceptTerms = true;
certs = {"${webdomain}" = {email = "admin@${webdomain}";};};
};
networking.firewall.allowedTCPPorts = [80 443];
}