summaryrefslogtreecommitdiff
path: root/nixos/sites/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/sites/default.nix')
-rw-r--r--nixos/sites/default.nix26
1 files changed, 25 insertions, 1 deletions
diff --git a/nixos/sites/default.nix b/nixos/sites/default.nix
index 1ddd148..95d8055 100644
--- a/nixos/sites/default.nix
+++ b/nixos/sites/default.nix
@@ -1,10 +1,34 @@
{ pkgs, ... }:
{
+ catbus-web-ui = pkgs.callPackage ./catbus-web-ui.nix {};
+
https = site: site // {
forceSSL = true;
enableACME = true;
};
- catbus-web-ui = pkgs.callPackage ./catbus-web-ui.nix {};
+ static = root: {
+ locations = {
+ "/" = {
+ root = root;
+ };
+ };
+ };
+
+ proxyACME = remoteHost: {
+ locations = {
+ "/.well-known/acme-challenge/" = {
+ proxyPass = "http://${remoteHost}";
+ };
+ };
+ };
+
+ proxySocket = socketPath: {
+ locations = {
+ "/" = {
+ proxyPass = "http://unix:/${socketPath}";
+ };
+ };
+ };
}