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": { "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": { "jfdic-web": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -173,6 +190,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"hakyll-skeleton": "hakyll-skeleton",
"jfdic-web": "jfdic-web", "jfdic-web": "jfdic-web",
"nix": "nix", "nix": "nix",
"nixops": "nixops", "nixops": "nixops",

View file

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

View file

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

View file

@ -1,14 +1,14 @@
# NixOps configuration for deploying the JFDIC website # NixOps configuration for deploying the JFDIC website
{
{ config, pkgs, ... }: self,
config,
let inputs,
sources = import ../nix/sources.nix; pkgs,
hakyll-skeleton = import sources.hakyll-skeleton { }; ...
}: let
hakyll-skeleton = import inputs.hakyll-skeleton {};
webdomain = "skeleton.jfdic.org"; webdomain = "skeleton.jfdic.org";
in { in {
environment.sessionVariables = { environment.sessionVariables = {
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
}; };
@ -20,14 +20,15 @@ in {
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts = { virtualHosts = {
"${webdomain}" = { # website hostname "${webdomain}" = {
# website hostname
enableACME = true; # Use ACME certs enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL forceSSL = true; # Force SSL
root = "${hakyll-skeleton}"; # Wesbite root root = "${hakyll-skeleton}"; # Wesbite root
}; };
"www.${webdomain}" = { # Respect our elders :-) "www.${webdomain}" = {
locations."/".extraConfig = # Respect our elders :-)
"return 301 $scheme://${webdomain}$request_uri;"; locations."/".extraConfig = "return 301 $scheme://${webdomain}$request_uri;";
}; };
}; };
}; };
@ -38,5 +39,4 @@ in {
}; };
networking.firewall.allowedTCPPorts = [80 443]; networking.firewall.allowedTCPPorts = [80 443];
} }