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",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgsUnstable": "nixpkgsUnstable",
|
"nixpkgsUnstable": "nixpkgsUnstable",
|
||||||
"resrok-web": "resrok-web",
|
"resrok-web": "resrok-web",
|
||||||
"utils": "utils_2"
|
"utils": "utils_2",
|
||||||
|
"voc-web": "voc-web"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
|
@ -211,6 +212,23 @@
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"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",
|
"root": "root",
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-22.05;
|
nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-22.05;
|
||||||
nixpkgsUnstable.url = github:NixOS/nixpkgs/?ref=nixos-unstable;
|
nixpkgsUnstable.url = github:NixOS/nixpkgs/?ref=nixos-unstable;
|
||||||
utils.url = "github:numtide/flake-utils";
|
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;
|
outputs = {...} @ args: import ./outputs.nix args;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
nixpkgsUnstable,
|
nixpkgsUnstable,
|
||||||
resrok-web,
|
resrok-web,
|
||||||
utils,
|
utils,
|
||||||
|
voc-web,
|
||||||
...
|
...
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
(utils.lib.eachDefaultSystem (system: let
|
(utils.lib.eachDefaultSystem (system: let
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# NixOps configuration for deploying the Voices of Capricornia website
|
# NixOps configuration for deploying the Voices of Capricornia website
|
||||||
|
{
|
||||||
{ config, pkgs, ... }:
|
self,
|
||||||
|
config,
|
||||||
let
|
inputs,
|
||||||
sources = import ../nix/sources.nix;
|
pkgs,
|
||||||
voc-web = import sources.voc-web { };
|
...
|
||||||
|
}: let
|
||||||
|
voc-web = import inputs.voc-web {};
|
||||||
webdomain = "voicesofcapricornia.org";
|
webdomain = "voicesofcapricornia.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 = "${voc-web}"; # Wesbite root
|
root = "${voc-web}"; # 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;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -43,5 +44,4 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [80 443];
|
networking.firewall.allowedTCPPorts = [80 443];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue