voc-web: converted to flake
This commit is contained in:
parent
44e6280a7a
commit
389281c905
20
flake.lock
20
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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
nixpkgsUnstable,
|
||||
resrok-web,
|
||||
utils,
|
||||
voc-web,
|
||||
...
|
||||
} @ inputs:
|
||||
(utils.lib.eachDefaultSystem (system: let
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue