32 lines
823 B
Nix
32 lines
823 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
virtualisation.oci-containers.containers."ghost-A20" = {
|
|
autoStart = true;
|
|
environment = {
|
|
url = "https://A20.4future.dev";
|
|
};
|
|
image = "ghost:alpine";
|
|
ports = [ "127.0.0.1:2369:2368" ];
|
|
volumes = [ "/run/A20:/var/lib/ghost/content" ];
|
|
};
|
|
|
|
fileSystems."/run/A20" =
|
|
{ device = "dpool/k8s/A20";
|
|
fsType = "zfs";
|
|
};
|
|
|
|
services.nginx.virtualHosts."A20.4future.dev" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:2369";
|
|
extraConfig = "
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
";
|
|
};
|
|
};
|
|
}
|