diff --git a/flake.lock b/flake.lock index 44c7a98..5ce6f2b 100644 --- a/flake.lock +++ b/flake.lock @@ -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", diff --git a/flake.nix b/flake.nix index dd11387..04039bb 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/outputs.nix b/outputs.nix index 3ea7025..d3be2f7 100644 --- a/outputs.nix +++ b/outputs.nix @@ -1,5 +1,6 @@ { self, + hakyll-skeleton, jfdic-web, nix, nixops, diff --git a/profiles/hakyll-skeleton.nix b/profiles/hakyll-skeleton.nix index 8a9ec7a..830ecbd 100644 --- a/profiles/hakyll-skeleton.nix +++ b/profiles/hakyll-skeleton.nix @@ -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]; }