diff --git a/flake.lock b/flake.lock index d8aabb2..44c7a98 100644 --- a/flake.lock +++ b/flake.lock @@ -179,7 +179,8 @@ "nixpkgs": "nixpkgs_3", "nixpkgsUnstable": "nixpkgsUnstable", "resrok-web": "resrok-web", - "utils": "utils_2" + "utils": "utils_2", + "voc-web": "voc-web" } }, "utils": { @@ -211,6 +212,23 @@ "repo": "flake-utils", "type": "github" } + }, + "voc-web": { + "flake": false, + "locked": { + "lastModified": 1656493019, + "narHash": "sha256-vdQBbaoJXrH3bDa47OHC9jpFUsVMCi++dCCdRf0VXis=", + "ref": "consensus", + "rev": "85eb99b5a0a010d8819ea6850c5a359d9ec397b9", + "revCount": 8, + "type": "git", + "url": "https://source.jfdic.org/voc/voc-web/" + }, + "original": { + "ref": "consensus", + "type": "git", + "url": "https://source.jfdic.org/voc/voc-web/" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2a26323..dd11387 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,10 @@ nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-22.05; nixpkgsUnstable.url = github:NixOS/nixpkgs/?ref=nixos-unstable; utils.url = "github:numtide/flake-utils"; + voc-web = { + flake = false; + url = git+https://source.jfdic.org/voc/voc-web/?ref=consensus; + }; }; outputs = {...} @ args: import ./outputs.nix args; diff --git a/outputs.nix b/outputs.nix index 658458e..3ea7025 100644 --- a/outputs.nix +++ b/outputs.nix @@ -7,6 +7,7 @@ nixpkgsUnstable, resrok-web, utils, + voc-web, ... } @ inputs: (utils.lib.eachDefaultSystem (system: let diff --git a/profiles/voc-web.nix b/profiles/voc-web.nix index a4d01f8..dc61399 100644 --- a/profiles/voc-web.nix +++ b/profiles/voc-web.nix @@ -1,14 +1,14 @@ # NixOps configuration for deploying the Voices of Capricornia website - -{ config, pkgs, ... }: - -let - sources = import ../nix/sources.nix; - voc-web = import sources.voc-web { }; +{ + self, + config, + inputs, + pkgs, + ... +}: let + voc-web = import inputs.voc-web {}; webdomain = "voicesofcapricornia.org"; - in { - environment.sessionVariables = { LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; }; @@ -20,14 +20,15 @@ in { recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts = { - "${webdomain}" = { # website hostname + "${webdomain}" = { + # website hostname enableACME = true; # Use ACME certs forceSSL = true; # Force SSL root = "${voc-web}"; # 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;"; }; }; }; @@ -42,6 +43,5 @@ in { }; }; - networking.firewall.allowedTCPPorts = [ 80 443 ]; - + networking.firewall.allowedTCPPorts = [80 443]; }