resrok-web: converted to flake
This commit is contained in:
parent
bea9dac4c5
commit
44e6280a7a
18
flake.lock
18
flake.lock
|
@ -154,6 +154,23 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"resrok-web": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1656494547,
|
||||
"narHash": "sha256-/8EgQxlqAX9tJv8TvsQybIh2O5TYSTOXmwtXC6gg3Dw=",
|
||||
"ref": "consensus",
|
||||
"rev": "e77bea1a3cc4da6f54c62ba21ca926392e842a21",
|
||||
"revCount": 5,
|
||||
"type": "git",
|
||||
"url": "https://source.jfdic.org/resrok/resrok-web/"
|
||||
},
|
||||
"original": {
|
||||
"ref": "consensus",
|
||||
"type": "git",
|
||||
"url": "https://source.jfdic.org/resrok/resrok-web/"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"jfdic-web": "jfdic-web",
|
||||
|
@ -161,6 +178,7 @@
|
|||
"nixops": "nixops",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgsUnstable": "nixpkgsUnstable",
|
||||
"resrok-web": "resrok-web",
|
||||
"utils": "utils_2"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
flake = false;
|
||||
url = git+https://source.jfdic.org/JFDIC/jfdic-web/?ref=consensus;
|
||||
};
|
||||
resrok-web = {
|
||||
flake = false;
|
||||
url = git+https://source.jfdic.org/resrok/resrok-web/?ref=consensus;
|
||||
};
|
||||
nix.url = "github:NixOS/nix/?ref=2.10.3";
|
||||
nixops.url = github:NixOS/nixops/?ref=master;
|
||||
nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-22.05;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
nixops,
|
||||
nixpkgs,
|
||||
nixpkgsUnstable,
|
||||
resrok-web,
|
||||
utils,
|
||||
...
|
||||
} @ inputs:
|
||||
|
|
|
@ -1,31 +1,33 @@
|
|||
# NixOps configuration for deploying the JFDIC website
|
||||
|
||||
{ config, pkgs, ...}:
|
||||
|
||||
let
|
||||
sources = import ../nix/sources.nix;
|
||||
resrok-web = import sources.resrok-web {};
|
||||
{
|
||||
self,
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
resrok-web = import inputs.resrok-web {};
|
||||
webdomain = "resrok.org";
|
||||
|
||||
in {
|
||||
|
||||
environment.sessionVariables = {
|
||||
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true; # Enable Nginx
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
enable = true; # Enable Nginx
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts = {
|
||||
"${webdomain}" = { # website hostname
|
||||
enableACME = true; # Use ACME certs
|
||||
forceSSL = true; # Force SSL
|
||||
root = "${resrok-web}"; # Wesbite root
|
||||
"${webdomain}" = {
|
||||
# website hostname
|
||||
enableACME = true; # Use ACME certs
|
||||
forceSSL = true; # Force SSL
|
||||
root = "${resrok-web}"; # Wesbite root
|
||||
};
|
||||
"www.${webdomain}" = { # Respect our elders :-)
|
||||
"www.${webdomain}" = {
|
||||
# Respect our elders :-)
|
||||
locations."/".extraConfig = "return 301 $scheme://${webdomain}$request_uri;";
|
||||
};
|
||||
};
|
||||
|
@ -41,6 +43,5 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue