hakyll-skeleton: converted to flake

This commit is contained in:
Fiscal Velvet Poet 2022-07-21 16:08:50 +10:00
parent 389281c905
commit aa6183ed0c
Signed by: fiscalvelvetpoet
GPG key ID: D8EBFD58B023BD47
4 changed files with 38 additions and 15 deletions

View file

@ -1,5 +1,22 @@
{
"nodes": {
"hakyll-skeleton": {
"flake": false,
"locked": {
"lastModified": 1656491537,
"narHash": "sha256-bC8ND81E0Sq7i+7btoSzhpCB75oHoa3eEcFvvG8XB4g=",
"ref": "consensus",
"rev": "c0df6f6abed90c66e2eff2106ce89bac0a3344db",
"revCount": 3,
"type": "git",
"url": "https://source.jfdic.org/jfdic/hakyll-skeleton/"
},
"original": {
"ref": "consensus",
"type": "git",
"url": "https://source.jfdic.org/jfdic/hakyll-skeleton/"
}
},
"jfdic-web": {
"flake": false,
"locked": {
@ -173,6 +190,7 @@
},
"root": {
"inputs": {
"hakyll-skeleton": "hakyll-skeleton",
"jfdic-web": "jfdic-web",
"nix": "nix",
"nixops": "nixops",

View file

@ -2,6 +2,10 @@
description = "jfdic-ops deployment";
inputs = {
hakyll-skeleton = {
flake = false;
url = git+https://source.jfdic.org/jfdic/hakyll-skeleton/?ref=consensus;
};
jfdic-web = {
flake = false;
url = git+https://source.jfdic.org/JFDIC/jfdic-web/?ref=consensus;

View file

@ -1,5 +1,6 @@
{
self,
hakyll-skeleton,
jfdic-web,
nix,
nixops,

View file

@ -1,14 +1,14 @@
# NixOps configuration for deploying the JFDIC website
{ config, pkgs, ... }:
let
sources = import ../nix/sources.nix;
hakyll-skeleton = import sources.hakyll-skeleton { };
{
self,
config,
inputs,
pkgs,
...
}: let
hakyll-skeleton = import inputs.hakyll-skeleton {};
webdomain = "skeleton.jfdic.org";
in {
environment.sessionVariables = {
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
};
@ -20,23 +20,23 @@ in {
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"${webdomain}" = { # website hostname
"${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;";
"www.${webdomain}" = {
# Respect our elders :-)
locations."/".extraConfig = "return 301 $scheme://${webdomain}$request_uri;";
};
};
};
security.acme = {
acceptTerms = true;
certs = { "${webdomain}" = { email = "admin@${webdomain}"; }; };
certs = {"${webdomain}" = {email = "admin@${webdomain}";};};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedTCPPorts = [80 443];
}